コード例 #1
0
        public virtual LoginResponse Login(string username, string password)
        {
            var user = GetUserByName(username);

            if (user != null && "password" == password)
            {
                return(new LoginResponse()
                {
                    IsSuccess = true,
                    UserId = 1,
                    UserName = username,
                    Role = (byte)user.UserType
                });
            }
            else
            {
                return(LoginResponse.CreateFailedResponse());
            }
        }