How to update a record in database with LINQ

First select your record you want to update:

var tabmax = context.Tabmaxes.Where(t => t.tabelle == "AAGFAKT" && t.mandant ==       null && t.krit == aAGAUFART).FirstOrDefault();

 

Then change it:

tabmax.tabmax1 += 1;

 

Then update it:

context.Update(tabmax);
context.SaveChanges();