public static void UpdateBankAccount(BankAccounts bankAccount)
        {
            BankaIslemleriEntities entities = new BankaIslemleriEntities();

            entities.BankAccounts.Where(k => k.Id == bankAccount.Id).FirstOrDefault().Amount = bankAccount.Amount;
            entities.SaveChanges();
        }
Beispiel #2
0
        public static void CreateUser(Users user)
        {
            BankaIslemleriEntities entities = new BankaIslemleriEntities();

            entities.Users.Add(user);
            entities.SaveChanges();
        }
Beispiel #3
0
 public static void InsertBankAccountToUser(BankAccounts bankAccount, int userId)
 {
     if (bankAccount != null)
     {
         BankaIslemleriEntities entities = new BankaIslemleriEntities();
         var user = GetUserById(userId);
         if (user != null)
         {
             entities.Users.Where(k => k.Id == userId).FirstOrDefault().BankAccounts.Add(bankAccount);
             entities.SaveChanges();
         }
     }
 }
Beispiel #4
0
        public static void UpdateUser(Users user)
        {
            BankaIslemleriEntities entities = new BankaIslemleriEntities();

            entities.SaveChanges();
        }