Questions tagged [savechanges]

DbContext.SaveChanges method in an Entity Framework method that saves all changes made in a context to the underlying database.

DbContext.SaveChanges method is Entity Framework method that saves all changes made in a context to the underlying database. More info: https://msdn.microsoft.com/en-us/library/system.data.entity.dbcontext.savechanges%28v=vs.113%29.aspx

421 questions
0
votes
1 answer

ASP.NET edit action will not save

I have a website that is used to complete health and safety self assessments but when you go to edit an assessment it will not save the edited data. Any one have and ideas? This is my controller: // GET: /WSAssessment/Edit public ActionResult…
0
votes
1 answer

Context.saveChanges() modifies foreign key that has already been set

I have two entities: public class UserProfile { [Key] [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)] public int UserId { get; set; } public string UserName { get; set; } } and public class VideoModel { public…
0
votes
1 answer

Inserting Entity that is also mapped to a view

I'm pretty new to Entity Framework 6 and so it may be a bit difficult on how to ask this question, but essentially I have an entity configuration that is set up like so: public class EntityExampleConfiguration : EntityTypeConfiguration { …
DeveryDay
  • 161
  • 15
0
votes
1 answer

.Net OData ServiceReference SaveChanges Returns OData

I am using an OData Service Reference to create a Purchase Order. When I call the OData SaveChanges method it does save my PO and somewhere in the response is the POID. Fiddler shows me that OData is returned from an OData SaveChanges call. My…
D. Kermott
  • 1,613
  • 17
  • 24
0
votes
1 answer

breeze mongo manager.saveChanges() error

I'm learning from breeze-zza-mongodb sample. I get some problems when i try to use the saveChanges() function from breeze. This is the error i get: "TypeError: Cannot read property 'update' of null at...…
Matt
  • 37
  • 1
  • 4
0
votes
1 answer

.Net Entity objectcontext thread error

I have an n-layered asp.net application which returns an object from my DAL to the BAL like so: public IEnumerable Get(SourceKey sk) { var query = from SourceKey in _dataContext.SourceKeys select SourceKey; if…
Chris Klepeis
  • 9,783
  • 16
  • 83
  • 149
0
votes
2 answers

Delete Row and Save DataGridView

I haven't done too much with DataGridViews in C# form applications so my approach is a rookie one I'm sure. Any help would be awesome! My form is displaying the DataGridView for my database, and I want to give the user the option of deleting a…
Cory Hull
  • 31
  • 5
0
votes
1 answer

AngularJS - Save data to $scope using routes?

i am just learning basics of angular and today it started to change my app using a factory to get data and implementing route provider ! So far everything works fine! But when I try to add data on another view and head back to my list view scope is…
phil-k
  • 67
  • 1
  • 8
0
votes
1 answer

Entity Framework : interrupt running SaveChanges

I have a unique ObjectContext, on which I perform a SaveChanges(). This operation takes some time (~60 seconds). This operation is executed in a thread. My user have a "Cancel" button on the screen. I'm able to stop the thread, but if the…
Julien N
  • 3,880
  • 4
  • 28
  • 46
0
votes
2 answers

C# Change File Location For Next Time Program Runs

I am relatively new to C#, however I do have some basic knowledge of code from courses in high school and university. However, there is one thing I have not been able to figure out over the years. I am currently making a Form Application for a…
Josh H
  • 63
  • 1
  • 8
0
votes
1 answer

show different content when bootstrap 3 modal closes

I'm not sure if this can be done, but I appreciate some help. I have read the documentation for bootstrap 3 modal. I haven't seen an example of how to do what I'm trying to demo after the user clicks "save" button in a modal. I am trying to put up…
Chris22
  • 1,973
  • 8
  • 37
  • 55
0
votes
1 answer

overriding breeze BeforeSaveEntity()

I was having the exact same problem as discussed in breezejs issues with the save bundle and the answer explains it great. The problem I have is - my application is somewhat large, having about 20+ entities that we modify. Hence if I override the…
devC
  • 1,384
  • 5
  • 32
  • 56
0
votes
2 answers

breeze doesn't recognize the modified entity

I have a breeze implementation where it takes a location object and displays the properties on the UI. I do a change to a few properties and try to save the changes, but breeze doesn't recognized the entity as changed. Following is my code: …
devC
  • 1,384
  • 5
  • 32
  • 56
0
votes
1 answer

breeze self.manager.getChanges() returns 0

I'm trying to modify an entity in breeze and call saveChanges(). But the entitiesToSave in my breeze manager is 0. I'm not sure what I do wrong. Here's how I retrieve the data through the controller: [HttpGet] [CustomAuthorize(Claims =…
devC
  • 1,384
  • 5
  • 32
  • 56
0
votes
1 answer

Unity 3D Undoes changes that I've made

I'm a newcomer to Unity3D development, and, while following a tutorial to make my first game, I noticed that a few steps I kept repeating as I flipped between the Unity application and my browser (chrome), which were both in full screen, certain…
Brent Allard
  • 386
  • 5
  • 20