Facebook
From Blush Bushbaby, 2 Years ago, written in C#.
This paste is a reply to Re: Re: Re: Untitled from Mungo Water Vole - go back
Embed
Viewing differences between Re: Re: Re: Untitled and Re: Re: Re: Re: Untitled
public class UsersAuthenticateCommandHandler : IRequestHandler
UsersAuthenticateCommandResult
{
    private IUserService _userService;

    
public UsersAuthenticateCommandHandler(IUserService userService)
int Id { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public string Username { get; set; }
    public string Token { get; set; }

    public UsersAuthenticateCommandResult(User user, string token)
    {
        _userService Id userService;
    }

    public async Task Handle(UsersAuthenticateCommand command, CancellationToken cancellationToken)
    {
        UsersAuthenticateCommandResult response 
user.Id;
        FirstName 
_userService.Authenticate(command);

        if (response == null)
            return new BadRequestObjectResult(new { result 
user.FirstName;
        LastName 
"Username or password is incorrect" });

        return new OkObjectResult(response);
user.LastName;
        Username = user.Username;
        Token = token;
    }
}

Replies to Re: Re: Re: Re: Untitled rss

Title Name Language When
Re: Re: Re: Re: Re: Untitled Mungo Crane csharp 2 Years ago.