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
2 answers

How to load in a batch file?

I'm trying to make a .bat game and have most of the codeing already done. I looked up how to have the player save and load and it told me to save with this @echo SET ITEMS=%ITEMS% >> savegame.cmd So it would save on savegame.cmd but how do i Load…
0
votes
1 answer

Updating Datagridview cell value programmaticaly only save part of the changes to the Database

im working on a Windows Forms app that allows the user to update the Database programmaticaly (update number of cells values once) and manualy (update one by one). the process works fine in the maual update, but when its trying to update…
someGuy
  • 43
  • 1
  • 1
  • 6
0
votes
2 answers

C#, LINQ batch items - what is the best way to do this?

I have 2 databases - (1) Feeds, (2) Production. The feeds database is fed from client files that we get on a daily basis and is, from my viewpoint, a read only source of data. When a feed file is received the feed app does its thing then finally…
Keith Barrows
  • 24,802
  • 26
  • 88
  • 134
0
votes
0 answers

Magento Telphone filed in Customer_Account_Edit page

I want to do the same as this guy do Magento: How to display customer's phone number on customer information field but I don't want only to display the customer phone number, I want to give ability to change the telephone number on this page. If I…
Alex Pasa
  • 25
  • 6
0
votes
1 answer

Save data of a Label in swift

I have a TextField in my settingsController that i can modify selecting a name from a pickerView, the problem is this : when i change the text of my textField i also change the text of a label in another controller, it work but when i close and…
Ludyem
  • 1,709
  • 1
  • 18
  • 33
0
votes
0 answers

Saving / Loading Data Java app

I have a small application in Java that uses a lot of quantities. I would like to save input from the users so that they wouldn't have to re-enter all the data each time they ran the app. I was thinking of having text files and overriding them with…
Oscar F
  • 323
  • 2
  • 9
  • 21
0
votes
1 answer

How save multiple values JSONStore

I need to replace multiple value in JSONStore of IBM Worklight. In this way is saved only first value. Why? .then(function() { for (var index = 0; index < elencoSpese.length; index++) { …
Marco
  • 199
  • 1
  • 5
  • 14
0
votes
1 answer

controller post actionresult not saving changes to database

I have a post method in my controller that is not saving changes to my database (SQL express). I am using viewmodels and valueinjector to populate the VM from my model. I have checked and the values in the viewmodel and they have changed, but when I…
steveareeno
  • 1,925
  • 5
  • 39
  • 59
0
votes
3 answers

Save changes in database controller class asp.net mvc5 identity

Visual Studio 2013, ASP.NEt MVC 5 Identity Please someone help me in how to save the information in the database through controller. Let me explain...I want the following to happen: The user when logged is able update his Education information.…
0
votes
1 answer

Decimal value error on SaveChanges

I need to store a value taken from a form into a column which is a decimal(4,0). First (in the controller) I take the value from the form and I convert it from string to decimal and multiply it for 100 so I'm able to keep the values I need //"12.34"…
perlice
  • 87
  • 6
0
votes
2 answers

Checkbox should saved and retrieved after closing the app, i tried it with sharedpreferences but it doesnt work and i dont know why

I am a beginner at android development and I tried to implement a class who save a checkbox with the sharedpreferences. It works so far that I can see everything and check the checkbox in the emulator. But The click on the Save Button crashes my…
PeterP
  • 3
  • 4
0
votes
0 answers

SaveChanges works on single CRUD operation but not mixed ones

I'm new to Entity framework and I have a stupid problem! I fill a datagrid view with data then make changes and finally push a button to save changes. As far as I just apply the same operation e.g as far as I just Add new records, there is no…
Hafez
  • 1
  • 1
0
votes
0 answers

Savechange() for specific entity loaded by the same DbContext

Please I want a solution for this scenario (with code please): I have two entity (X and Y) loaded by the same DbContext Load entity X Modified entity X Load entity Y Modified entity Y Save changes for entity Y Undo changes for entity X Every time…
cheikh17
  • 57
  • 8
0
votes
1 answer

No Exception thrown on SaveChanges() for invalid entities using N-Tier Entity Framework

There are certain situations when entity.IsValid is false but no exception is thrown on SaveChanges(). The modelChangeSet only returns Valid entities (by default) and does not throw any exceptions for entities that are not valid. Thus the invalid…
0
votes
0 answers

Error entity framework saving parent with child collections

I am trying to save many tables in one operation. T1 many to many relation with T3,(T2 being used as the association table). T3 has One to Many relation with T4 T4 has one to one relation with T5 T3 has one to many relation with T6 Now, I created…