Search
 
SCRIPT & CODE EXAMPLE
 

C

entity framework core discard changes

public void RejectChanges()
    {
        foreach (var entry in ChangeTracker.Entries())
        {
            switch (entry.State)
            {
                case EntityState.Modified:
                case EntityState.Deleted:
                    entry.State = EntityState.Modified; //Revert changes made to deleted entity.
                    entry.State = EntityState.Unchanged;
                    break;
                case EntityState.Added:
                    entry.State = EntityState.Detached;
                    break;
            }
        }
    }
Comment

PREVIOUS NEXT
Code Example
C :: le reste de division in algorithm c 
C :: metw.cc 
C :: Highest integer among the four inputs in c 
C :: vscode how to output in seperate consile 
C :: c hello word 
C :: Answer to storing information in array 
C :: How to include multiline conditional inside template literal 
C :: C Character l/O 
C :: grep C hello world 
C :: convert calendar time to epoch in c programming 
C :: tytykjtuky 
C :: windows block application au demarrage regegit 
C :: how to output in green in c 
C :: georgia institute of technology 
C :: pebble scripting Boolean expression 
C :: 11*179*.9*1.35 
C :: Trier lexicographiquement en c 
C :: command to perform safe shutdown in unix 
C :: sue murry 
C :: return multiple values using the call by reference 
C :: iulia vântur 
C :: C (Windows) 
C :: not repeated serial number in c 
C :: in C char to string 
C :: time random c 
Dart :: flutter listtile shape 
Dart :: flutter sharedpreferences clear 
Dart :: flutter textfield outlineinputborder 
Dart :: how to print in the same line in dart 
Dart :: flutter date time to timestamp 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =