public void Delete(long id) { using (var context = new CashFlowContext()) { var transfer = context.Transfer.FirstOrDefault(t => t.Id == id); if (transfer != null) { context.Remove(transfer); context.SaveChanges(); } } }
public void Delete(long id) { using (var context = new CashFlowContext()) { var Account = context.Account.FirstOrDefault(t => t.Id == id); if (Account != null) { context.Remove(Account); context.SaveChanges(); } } }