Closed sjd2021 closed 1 year ago
No there's no issue with someone doing that.
@amunim I've set this up locally, and it doesn't actually seem to work for this handler:
public MyMediatrRequest<T> : IRequest<Paged<T>>, IBaseRequest
{
public MyMediatrHandler : IRequestHandler<MyMediatrRequest<T>, Paged<T>>
{
}
}
No service for type 'MediatR.IRequestHandler
2...`
This isn't working. Any idea why?
I have exams... will look into it by the end of the month
I don't think the stock container can handle this anyway, you might need AutoFac or something else.
I have exams... will look into it by the end of the month
ok please let me know what you find. I'm willing to take up anything if you can provide insight on what is missing between now and when this was working for you (aside from namespaces/nuget packages being moved around).
@sjd2021 or anyone stumbling upon this issue:
RegisterGenericMediatRHandlers
extension method
This PR to register generic request handlers (
RegisterGenericMediatRHandlers
) was opened in the old MediatR repository and closed. Is there an issue with it being ported over, as-is, or as close to that as possible since registration has somewhat changed?https://github.com/jbogard/MediatR.Extensions.Microsoft.DependencyInjection/pull/115