public int InsertAccountType(AccountType accountType) { context.AccountTypes.Add(accountType); context.SaveChanges(); return accountType.Id; }
public void UpdateAccountType(AccountType accountType) { AccountType dbAccountType = context.AccountTypes.Find(accountType.Id); if (dbAccountType != null) { dbAccountType.Name = accountType.Name; context.SaveChanges(); } }