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

    
public string Username { get; set; }
 
    [Required]
    
UsersAuthenticateCommandHandler(IUserService userService)
    {
        _userService = userService;
    }

    
public string Password async Task Handle(UsersAuthenticateCommand command, CancellationToken cancellationToken)
    {
        UsersAuthenticateCommandResult response = _userService.Authenticate(command);

        if (response == null)
            return new BadRequestObjectResult(new 
get; set; result = "Username or password is incorrect" });

        return new OkObjectResult(response);
    
}
}

Replies to Re: Re: Re: Untitled rss

Title Name Language When
Re: Re: Re: Re: Untitled Blush Bushbaby csharp 2 Years ago.