Task <Guid> IRemitterDataAccess.SaveRemitter(RemitterModel model) { using (var db = new SymexDbContext()) { db.Add <RemitterModel>(model); db.SaveChanges(); return(Task.Run(() => model.ID)); } }
public Task <bool> UpdateRemitter(Guid id, string status) { try { using (var db = new SymexDbContext()) { var remitter = db.remitterData.FirstOrDefault(x => x.ID == id); remitter.Status = status; db.Update <RemitterModel>(remitter); db.SaveChanges(); return(Task.Run(() => true)); } } catch (Exception) { return(Task.Run(() => false)); } }