コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }