public IEnumerable <Member> GetMemberWithEmail() { try { var result = Context.Memberes.Include(m => m.Emails).ToList(); return(result); } catch (Exception exception) { DataBaseExceptions.WriteExceptionMessageToFile(exception); return(null); } }
public Users UserSignIn(string email, string password) { try { return(Context.Users. FirstOrDefault(u => u.Email.Equals(email, StringComparison.OrdinalIgnoreCase) && u.Password == password)); } catch (Exception exception) { DataBaseExceptions.WriteExceptionMessageToFile(exception); return(null); } }
public bool UserLoginAuthentication(string email, string password) { try { return(Context.Users. Any(u => u.Email.Equals(email, StringComparison.OrdinalIgnoreCase) && u.Password == password)); } catch (Exception exception) { DataBaseExceptions.WriteExceptionMessageToFile(exception); return(false); } }