You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class UpdateTodoListCommandValidator : AbstractValidator<UpdateTodoListCommand>
{
public UpdateTodoListCommandValidator()
{
RuleFor(v => v.Title)
.NotEmpty()
.MaximumLength(200);
}
}
public record UpdateTodoListCommand : IRequest<int>
{
public int Id { get; init; }
public string? Title { get; init; }
}
public class UpdateTodoListCommandHandler : IRequestHandler<UpdateTodoListCommand,int>
{
public async Task<int> Handle(UpdateTodoListCommand request, CancellationToken cancellationToken)
{
return 1;
}
}
`
but when we remove the Irequest Result (In this example (int)) Validation is not fired.
Kind regards and thanks for a fantastic free tool.
The text was updated successfully, but these errors were encountered:
Hi
In Dot Net SDK 8
MediatR 12.2
This code is working properly
`
`
but when we remove the Irequest Result (In this example (int)) Validation is not fired.
Kind regards and thanks for a fantastic free tool.
The text was updated successfully, but these errors were encountered: