public async Task <IActionResult> Edit(int id, [Bind("id,value,currency_id")] BankTotalBalance bankTotalBalance) { if (id != bankTotalBalance.id) { return(NotFound()); } if (ModelState.IsValid) { try { await _bankTotalBalanceService.Update(bankTotalBalance); } catch (DbUpdateConcurrencyException) { if (!BankTotalBalanceExists(bankTotalBalance.id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(bankTotalBalance)); }
public async Task <IActionResult> Create([Bind("id,value,currency_id")] BankTotalBalance bankTotalBalance) { if (ModelState.IsValid) { await _bankTotalBalanceService.AddAndSave(bankTotalBalance); return(RedirectToAction(nameof(Index))); } return(View(bankTotalBalance)); }
public void Delete(BankTotalBalance bank_total_balance) { _context.Remove(bank_total_balance); }
public void Update(BankTotalBalance bank_total_balance) { _context.Update(bank_total_balance); }
public void Add(BankTotalBalance bank_total_balance) { _context.Add(bank_total_balance); }
// POST: Roles/Delete/5 public async Task Delete(BankTotalBalance bank_total_balance) { _bankTotalBalanceRepo.Delete(bank_total_balance); await _bankTotalBalanceRepo.Save(); }
// POST: Roles/Create public async Task AddAndSave(BankTotalBalance bank_total_balance) { _bankTotalBalanceRepo.Add(bank_total_balance); await _bankTotalBalanceRepo.Save(); }