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

How to make sure all chages are saved before closing the program?

I have a large c# project at work that controls a radar jammer. When the project is loaded, we create 3 threads and each one opens what we call a "mainform" (closing one of the mainforms will shut down the program. The problem I'm currently…
user1469786
0
votes
1 answer

Android tutorial Button "Save" the changes in Ringtone, Notification Volume

Doese anyone know of a tutorial on how to make a Volume Controller like this one (with a Save button at the bottom). This is my problem, how to make that "Save" button. I can create all the volume SeekBars, but unfortunately when I make changes on…
0
votes
1 answer

Persisting Entity in EntityFramework 4.3.1 doesn't return navigation properties

I am working with the EntityFramework 4.3.1 in Visual Studio 2010. I have a root entity object called container which has a navigation property called containerversions hanging off of it. When a new containerversion is required I: New up a…
0
votes
1 answer

MVC3 db.SaveChanges() inner exception

I am trying to add order list from shopping cart. I am doing this similarly as http://www.asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-9 db.saveChanges() has error, 'An error occurred while updating the entries. See the inner exception…
wholee1
  • 1,491
  • 13
  • 34
  • 51
0
votes
1 answer

How to save an entity with a collection of related entities using WCF data services

I have a new ParameterPart entity that is related to a new InputOutputMap. The InputOutputMap has several InputStates that I pull from the database and I need to associate with the InputOutputMap. How do I save this chain to the database using MVC…
Yasir
  • 1,595
  • 5
  • 23
  • 42
-1
votes
1 answer

Does CountAsync method in EF Core results to SaveChanges or not?

I have an important question which I couldn't find the answer anywhere! Suppose we call the Count or CountAsync method in EF or EFCore like this: public async Task Count() { return await _context.Set().CountAsync(); } Does it…
-1
votes
1 answer

Entity Framework Core, DB First. Beginner questions about losing data accidentally

I haven't written a single line with EF Core yet but I have been reading tutorials and trying to get a grasp of the concept first. I have not been abl to find any answers to these questions regarding losing data accidentally: Using Database First,…
hk1980
  • 95
  • 1
  • 7
-1
votes
1 answer

How would I save a int value upon exit

I have a cookie clicker like game. How would I make so that my score in my clicker game saves to a file on close. Code for score: int points = 0; Code for exit: this.Close();
-1
votes
1 answer

Howto remove an entry in DBContext when this Entity is already saved in Database EF Core

I am facing an issue with dbcontext entries. I have 2 Entities to save to database with EF Core. EntityA EntityB EntityA , is already saved to database but EntityB not. When I call my code to SaveChanges EntityA, I have an error Duplicate entry…
jolynice
  • 514
  • 1
  • 8
  • 25
-1
votes
1 answer

How to disable 'Save changes' dialog in Adobe Reader (create PDF using TCPDF)?

We are using TCPDF library to generate the PDF file from HTML. It is working fine in Web Brower but when we open and then close it in Adobe Reader it is showing a dialog Do you want to Save Changes xyz file. Visited different forums but can't find…
-1
votes
1 answer

NodeJS Service, the group I created is updated but not stored in databse

I wrote this service and when I call it, the JSON response is the group is updated but when I check the group details it is not updated, the old details are still present. I don't know where or what is the issue. This is my…
AAA
  • 1,957
  • 4
  • 23
  • 42
-1
votes
1 answer

How to create a save button that overwrites previously selected file

How would you make a Save button that, unlike a SaveAs button, will save over the previously selected file without opening a dialog? I have no trouble utilizing SaveAs to open a Save Dialog and create a file but automatically saving to a previously…
-1
votes
2 answers

android onSaveInstanceState usage

Please guide in the following class what I should save in. Please remember I am using only one string which is I am retriving from getextra method and there is nothing which I think I should store in the following overridden method. protected void…
d-man
  • 57,473
  • 85
  • 212
  • 296
-2
votes
2 answers

Save different versions of a .jar file

I'm writing a program in netbeans 7.0.1 that is being used to store character sheets for D&D. I need to run it as just a executable jar so that my friends can use it as well. How do I go about adding the ability for it to save changes to the sheet?…
-2
votes
1 answer

Save a value in HTML after it is changed

I have a problem, I am trying to save a value when it's changed, also this changes for everyone i.e whoever sees it online. So take this site for example: https://scorecount.com/tennis/ when the click on the 0 it turns 15 but if you refresh the page…
Kronox
  • 15
  • 1
  • 7
1 2 3
28
29