public bool Delete(string id) { Product product = context.Products.Find(id); if (product == null) { return(false); } context.Remove(product); return(context.SaveChanges() == 1); }
public bool Delete(string accountId) { Account account = context.Accounts.Find(accountId); if (account == null) { return(false); } context.Remove(account); return(context.SaveChanges() == 1); }