Esempio n. 1
0
 public bool CreateRecurring(Recurring instance)
 {
     if (instance.id == 0)
     {
         Db.Recurrings.Add(instance);
         Db.SaveChanges();
         return true;
     }
     return false;
 }
Esempio n. 2
0
 public bool UpdateRecurring(Recurring instance)
 {
     var cache = Db.Recurrings.FirstOrDefault(o => o.id == instance.id);
     if (cache != null)
     {
         Db.Entry(cache).CurrentValues.SetValues(instance);
         Db.SaveChanges();
         return true;
     }
     return false;
 }