Exemple #1
0
 public void Edit(Account account)
 {
     if (account != null)
     {
         db.Entry(account).State = EntityState.Modified;
     }
 }
Exemple #2
0
 public void Add(Account account)
 {
     if (account != null)
     {
         db.Accounts.Add(account);
     }
 }
Exemple #3
0
 public Account GetByEmailAndPassword(Account account)
 {
     var existedAccount = db.Accounts.Where(a => a.Email == account.Email && a.Password == account.Password).FirstOrDefault();
     if (existedAccount != null)
     {
         return existedAccount;
     }
     else
     {
         return null;
     }
 }
Exemple #4
0
 public bool IsExists(Account account)
 {
     return repository.IsExists(account);
 }
Exemple #5
0
 public Account GetByEmailAndPassword(Account account)
 {
     return repository.GetByEmailAndPassword(account);
 }
Exemple #6
0
 public void Edit(Account account)
 {
     repository.Edit(account);
 }
Exemple #7
0
 public void Add(Account account)
 {
     repository.Add(account);
 }
Exemple #8
0
 public bool IsExists(Account account)
 {
     var accounts = db.Accounts.Where(a => a.Email == account.Email && a.Password == account.Password).FirstOrDefault();
     return accounts != null ? true : false;
 }