public CheckingAccount SaveCheckingAccount(CheckingAccount checkingAccount) { this.applicationDbContext.Entry(checkingAccount).State = EntityState.Modified; this.applicationDbContext.SaveChanges(); return(checkingAccount); }
public CheckingAccount GetAccountByNumber(string accountNumber) { CheckingAccount checkingAccount = this.applicationDbContext.CheckingAccounts.Where(c => c.AccountNumber == accountNumber).FirstOrDefault <CheckingAccount>(); return(checkingAccount); }
public CheckingAccount AddCheckingAccount(CheckingAccount checkingAccount) { this.applicationDbContext.CheckingAccounts.Add(checkingAccount); this.applicationDbContext.SaveChanges(); return(checkingAccount); }
public CheckingAccount GetCheckingAccountById(int id) { CheckingAccount checkingAccount = this.applicationDbContext.CheckingAccounts.Where(c => c.Id == id).FirstOrDefault <CheckingAccount>(); return(checkingAccount); }