Answers for "update multiple records with entity framework"

C#
1

update multiple records with entity framework

using (var dbcontext = new MyModel()){
   var matchedRecords = dbcontext.DummyTable.Where(e => e.code.Equals(entry.code) && e.isValid.Equals(true)).ToList();
   matchedRecords.ForEach(e => e.isValid = false);
   dbcontext.SaveChanges();
}
Posted by: Guest on August-29-2020

Code answers related to "update multiple records with entity framework"

C# Answers by Framework

Browse Popular Code Answers by Language