public async Task TestCleanupAsync() { try { _context.Remove(user); await _context.SaveChangesAsync(); } catch { } }
public async Task <bool> DeleteByID(int id) { var customer = await GetCustomerByID(id); _context.Remove(customer); //Change Tracker : only change the state var success = await _context.SaveChangesAsync(); if (success == 0) { return(false); } return(true); }
public async Task <IActionResult> DeleteCustomer([FromRoute] long id) { var _customer = await _context.Customers.FindAsync(id); if (_customer == null) { return(NotFound()); } _context.Remove(_customer); await _context.SaveChangesAsync(); return(NoContent()); }
public void Delete(TransactionHistories transaction_histories) { _context.Remove(transaction_histories); }
public void Delete(Users user) { _context.Remove(user); }
public void Delete(BankTotalBalance bank_total_balance) { _context.Remove(bank_total_balance); }
public void Delete(Operations operation) { _context.Remove(operation); }
public void Delete(Currencies currencies) { _context.Remove(currencies); }
public void Delete(CurrencyExchange currency_exchange) { _context.Remove(currency_exchange); }
public void Delete(Accounts account) { _context.Remove(account); }