public int CreateAccountHolder(AccountHolder accountHolder)
        {
            try
            {
                context.AccountHolders.Add(accountHolder);
                context.SaveChanges();
                return(accountHolder.Id);
            }
            catch (Exception ea)
            {
                Console.WriteLine($"err2: {ea.Message}");
            }



            return(0);
        }
Beispiel #2
0
 public bool Create(Account account)
 {
     context.Accounts.Add(account);
     context.SaveChanges();
     return(true);
 }