partial void OnValueChanged()
 {
     if (UpdatingValue)
     {
         return;
     }
     using (MyAppDataContext dc = new MyAppDataContext())
     {
         var q = from o in dc.GetTable <Things>() where o.Id == 13 select o;
         foreach (Things o in q)
         {
             o.UpdatingValue = true;
             o.Value         = "1"; // try to change some other row
             o.UpdatingValue = false;
         }
         dc.SubmitChanges();
     }
 }
示例#2
0
 public RentedCarsController(MyAppDataContext context)
 {
     _context = context;
 }
 public EmployeesController(MyAppDataContext context)
 {
     _context = context;
 }
 public PassportsController(MyAppDataContext context)
 {
     _context = context;
 }
 public EmployeeRepository(MyAppDataContext context)
 {
     _context = context;
 }
示例#6
0
 public BrandsController(MyAppDataContext context)
 {
     _context = context;
 }