public bool Delete(List <int> ids) { using (FinanceEntities context = factory.CreateContext()) { foreach (var id in ids) { var ef = new BalanceDate() { BalanceDateId = id }; context.Entry(ef).State = EntityState.Deleted; } // deletes are cascaded to BalanceBankAccount context.SaveChanges(); } return(true); }
public bool Delete(List<int> ids) { using (FinanceEntities context = factory.CreateContext()) { foreach (var id in ids) { var ef = new BalanceDate() { BalanceDateId = id }; context.Entry(ef).State = EntityState.Deleted; } // deletes are cascaded to BalanceBankAccount context.SaveChanges(); } return true; }