public TaxRecord Update(TaxRecord r) { using (var db = new TaxDB()) { var res = db.Update(r); db.SaveChanges(); return(res.Entity); } }
public void Delete(long id) { using (var db = new TaxDB()) { var r = db.TaxPeriods.Find(id); db.TaxPeriods.Remove(r); db.SaveChanges(); }; }
public TaxRecord Create(TaxRecord t) { using (var db = new TaxDB()) { var res = db.TaxPeriods.Add(t); db.SaveChanges(); return(res.Entity); }; }
public void Restore(long id) { using (var db = new TaxDB()) { var r = db.TaxPeriods.Find(id); r.Deleted = null; db.SaveChanges(); }; }
public void Delete(long id) { using (var db = new TaxDB()) { var r = db.TaxPeriods.Find(id); r.Deleted = _time.CurrentTime(); db.SaveChanges(); }; }
public TaxRecord Update(TaxRecord r) { using (var db = new TaxDB()) { r.Modified = _time.CurrentTime(); var res = db.Update(r); db.SaveChanges(); return(res.Entity); } }