public void Edit(Account account) { if (account != null) { db.Entry(account).State = EntityState.Modified; } }
public void Add(Account account) { if (account != null) { db.Accounts.Add(account); } }
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; } }
public bool IsExists(Account account) { return repository.IsExists(account); }
public Account GetByEmailAndPassword(Account account) { return repository.GetByEmailAndPassword(account); }
public void Edit(Account account) { repository.Edit(account); }
public void Add(Account account) { repository.Add(account); }
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; }