Skip to content

Update README to clarify requirement on IRequest interface #44

@bifocalpirate

Description

@bifocalpirate

The interface implementation for

public class CreateContactCommand : IRequest<CreateContactCommand, Task<int>>

and

public class CreateContactCommandHandler : IRequestHandler<CreateContactCommand, Task<int>>

differs from

public class CreateContactCommand : IRequest<CreateContactCommand, Task>

and

public class CreateContactCommandHandler : IRequestHandler<CreateContactCommand, Task>

If I have a Validator implemented as

public class CreateContactCommandValidator : AbstractValidator<CreateContactCommand>

The second interface implementation does not trigger the Handler, while the first does. It seems that every request must always have a return type of Task<T> and not only Task.

Can we update the README to reflect this?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions