Esempio n. 1
0
 public void SetLastCleanup(DateTime datetime) {
   using (var db = CreateContext()) {
     var entity = db.Lifecycles.SingleOrDefault();
     if (entity != null) {
       entity.LastCleanup = datetime;
     } else {
       entity = new Lifecycle();
       entity.LifecycleId = 0; // always only one entry with ID:0
       entity.LastCleanup = datetime;
       db.Lifecycles.InsertOnSubmit(entity);
     }
     db.SubmitChanges();
   }
 }
 partial void UpdateLifecycle(Lifecycle instance);
 partial void DeleteLifecycle(Lifecycle instance);
 partial void InsertLifecycle(Lifecycle instance);