public static User GetUserDetails(string username, string password) { CommonUserServices _commonUserServices = new CommonUserServices(); return(_commonUserServices.GetUsers().FirstOrDefault(user => user.UserName.Equals(username, StringComparison.OrdinalIgnoreCase) && user.Password == password)); }
public static bool Login(string username, string password) { CommonUserServices _commonUserServices = new CommonUserServices(); var UserLists = _commonUserServices.GetUsers(); return(UserLists.Any(user => user.UserName.Equals(username, StringComparison.OrdinalIgnoreCase) && user.Password == password)); }