public void Update(long id, Bank bank) { var isAlive = ReadById(id); if (isAlive != null) { _bankdbContext.Update(bank); _bankdbContext.SaveChanges(); } else { Console.WriteLine($"Bank with this id {id} couldn't be found!"); } }
public void Update(string iban, Account account) { var checkAccount = Read(iban); if (checkAccount != null) { _bankdbContext.Update(account); _bankdbContext.SaveChanges(); } else { throw new NotImplementedException(); } }
public void Update(long id, Customer customer) { var checkCustomer = Read(id); if (checkCustomer != null) { _bankdbContext.Update(customer); _bankdbContext.SaveChanges(); } else { throw new NotImplementedException(); } }
public void Update(long id, Customer customer) { var isAlive = ReadById(id); if (isAlive != null) { _bankdbContext.Update(customer); _bankdbContext.SaveChanges(); } else { Console.WriteLine($"Didn't find customer with id: {id}."); } }
public void Update(string id, Account account) { var accExists = ReadById(id); if (accExists != null) { _bankdbContext.Update(account); _bankdbContext.SaveChanges(); } else { Console.WriteLine($"Can't find account with this id {id}"); } }
public void Update(long id, Bank bank) { var checkBank = Read(id); if (checkBank != null) { _BankdbContext.Update(bank); _BankdbContext.SaveChanges(); } else { throw new NotImplementedException(); } }
public void Update(long id, Customer customer) { var customerIsReal = ReadById(id); if (customerIsReal != null) { _bankdbContext.Update(customer); _bankdbContext.SaveChanges(); Console.WriteLine("Tiedot tallennettu"); } else { Console.WriteLine($"Päivitys epäonnistui - Henkilöä ei ole olemassa"); } }
public void UpdateBank(long id, Bank bank) { var isBankOkay = Read(id); if (isBankOkay != null) { _bankdbContext.Update(bank); _bankdbContext.SaveChanges(); Console.WriteLine("Tiedot tallennettu onnistuneesti!"); } else { Console.WriteLine("Tietojen tallennus epäonnistui - pankkia ei ole olemassa!"); } }
public void Update(long id, Transaction transaction) { var isAlive = ReadById(id); if (isAlive != null) { _bankdbContext.Update(transaction); _bankdbContext.SaveChanges(); Console.WriteLine($"Bank with id {transaction.Id} updated succesfully!"); } else { Console.WriteLine($"Transaction with this id {id} couldn't be found!"); } }
public void Update(long id, Bank bank) { var updateBank = ReadById(id); if (updateBank != null) { _BankdbContext.Update(bank); _BankdbContext.SaveChanges(); Console.WriteLine("Tiedot tallennettu onnistuneesti."); } else { Console.WriteLine("Tietojen tallennus epäonnistui. Pankkia ei ole olemassa!"); } }
public void Update(long id, Customer customer) { var checkCustomer = GetCustomer(id); if (checkCustomer != null) { _bankdbContext.Update(customer); _bankdbContext.SaveChanges(); Console.WriteLine("Tiedot päivitetty."); } else { Console.WriteLine("Pahus, jokin meni pieleen!"); } }
public void Update(long id, Customer customer) { var customerIsReal = ReadById(id); if (customerIsReal != null) { _bankdbContext.Update(customer); _bankdbContext.SaveChanges(); Console.WriteLine("Tiedot tallennettu"); } else { Console.WriteLine($"Väärä henkilö"); } }
public void Update(long id, Bank bank) { var isBankReal = ReadById(id); if (isBankReal != null) { _bankdbContext.Update(bank); _bankdbContext.SaveChanges(); Console.WriteLine("Tiedot tallennettu onnistuneesti"); } else { Console.WriteLine($"Päivitys epäonnistui - Pankkia ei ole olemassa"); } }
public void Update(long id, Bank bank) { var checkBank = GetBankById(id); if (checkBank != null) { _bankdbContext.Update(bank); _bankdbContext.SaveChanges(); Console.WriteLine("Tiedot päivitetty."); } else { Console.WriteLine("Pahus, jokin meni pieleen!"); } }
public void Update(long id, Account account) { var updateAccount = ReadById(id); if (updateAccount != null) { _BankdbContext.Update(account); _BankdbContext.SaveChanges(); Console.WriteLine("Tiedot tallennettu onnistuneesti."); } else { Console.WriteLine("Tietojen tallennus epäonnistui. Tiliä ei ole olemassa!"); } }
public void UpdateCustomer(long id, Customer customer) { var isCustomerOkay = Read(id); if (isCustomerOkay != null) { _bankdbContext.Update(customer); _bankdbContext.SaveChanges(); Console.WriteLine("Tiedot päivitetty onnistuneesti!"); } else { Console.WriteLine("Tietojen päivitys epäonnistui - asiakasta ei ole olemassa!"); } }
public void Update(long id, Transaction transaction) { var updateTransaction = ReadById(id); if (updateTransaction != null) { _BankdbContext.Update(transaction); _BankdbContext.SaveChanges(); Console.WriteLine("Tiedot tallennettu onnistuneesti."); } else { Console.WriteLine("Tietojen tallennus epäonnistui. Tilitapahtumaa ei ole olemassa!"); } }
public void Update(long id, Bank bank) { var isBankReal = ReadById(id); if (isBankReal != null) { _bankdbContext.Update(bank); _bankdbContext.SaveChanges(); Console.WriteLine("Tiedot tallennettu"); } else { Console.WriteLine($"Väärä pankki"); } }
public void UpdateCustomer(Customer customer) //Update henkilö { using (var context = new BankdbContext()) { try { context.Update(customer); context.SaveChanges(); } catch (Exception ex) { throw new NotImplementedException($"{ex.Message}\n{ex.InnerException.Message}"); } } }
public void UpdateBank(Bank bank) // Update { using (var context = new BankdbContext()) { try { context.Update(bank); context.SaveChanges(); } catch (Exception ex) { throw new NotImplementedException($"{ex.Message}\n{ex.InnerException.Message}"); } } }
public void UpdateBank(Bank bank) { using (var context = new BankdbContext()) { try { //Lisätään tapahtumatauluun rivi context.Update(bank); //Tallennetaan muutokset tietokantaan context.SaveChanges(); } catch (Exception ex) { throw new NotImplementedException($"{ex.Message}\n{ex.InnerException.Message}"); } } }
public void Update(long id, Customer customer) { var updateCustomer = ReadById(id); if (updateCustomer != null) { _BankdbContext.Update(customer); _BankdbContext.SaveChanges(); Console.WriteLine("Tiedot tallennettu onnistuneesti."); } else { Console.WriteLine("Tietojen tallennus epäonnistui. Asiakasta ei ole olemassa!"); } }
public Customer Update(Customer customer) { _bankdbContext.Update(customer); _bankdbContext.SaveChanges(); return(customer); }
public Customer Update(int id, Customer customer) { _context.Update(customer); _context.SaveChanges(); return(customer); }
//Update customer public Customer Update(Customer updateCustomer) { _context.Update(updateCustomer); _context.SaveChanges(); return(updateCustomer); }
// Update public Account Update(string IBAN, Account account) { _context.Update(account); _context.SaveChanges(); return(account); }
public Bank Update(int id, Bank bank) { _context.Update(bank); _context.SaveChanges(); return(bank); }
public Transaction Update(int id, Transaction transaction) { _context.Update(transaction); _context.SaveChanges(); return(transaction); }
public Bank Update(Bank bank) { _bankdbContext.Update(bank); _bankdbContext.SaveChanges(); return(bank); }
public Account Update(Account account) { _bankdbContext.Update(account); _bankdbContext.SaveChanges(); return(account); }