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
Then at runtime everything is resolved and works. But if I leave it to automatic registration with RegisterGenericHandlers = true I have some weird error (namespaces redacted for brevity, everything is in the same assembly):
System.InvalidOperationException: No service for type 'MediatR.IRequestHandler2[CreateCommand2[CreateClientDto,ClientEntity],Result1[ClientEntity]]' has been registered.`
Which is extremely weird, because manual registration of the very same works.
Am I missing something? I can provide more code if anyone thinks it matters, I honestly think it doesnt, like my classes implementations and such.
The text was updated successfully, but these errors were encountered:
If I make the following registration:
builder.Services.AddScoped<IRequestHandler<CreateCommand<CreateClientDto, ClientEntity>, Result<ClientEntity>>, CreateHandler<CreateClientDto, ClientEntity>>();
Then at runtime everything is resolved and works. But if I leave it to automatic registration with RegisterGenericHandlers = true I have some weird error (namespaces redacted for brevity, everything is in the same assembly):
System.InvalidOperationException: No service for type 'MediatR.IRequestHandler
2[CreateCommand2[CreateClientDto,ClientEntity],Result
1[ClientEntity]]' has been registered.`Which is extremely weird, because manual registration of the very same works.
Am I missing something? I can provide more code if anyone thinks it matters, I honestly think it doesnt, like my classes implementations and such.
The text was updated successfully, but these errors were encountered: