Exemplo n.º 1
0
 public async Task TestCleanupAsync()
 {
     try
     {
         _context.Remove(user);
         await _context.SaveChangesAsync();
     }
     catch { }
 }
Exemplo n.º 2
0
        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);
 }
Exemplo n.º 5
0
 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);
 }
Exemplo n.º 8
0
 public void Delete(Currencies currencies)
 {
     _context.Remove(currencies);
 }
Exemplo n.º 9
0
 public void Delete(CurrencyExchange currency_exchange)
 {
     _context.Remove(currency_exchange);
 }
Exemplo n.º 10
0
 public void Delete(Accounts account)
 {
     _context.Remove(account);
 }