Open aalirezamoradii opened 1 month ago
@aalirezamoradii Thanks for reporting the issue. Would it be possible for you to update the sample you provided? As of now, I get an error on the XCommandHandler
stating that:
The type 'XCommandRequest' must be convertible to 'MediatR.IRequest<Dto<XCommandResponse>>' in order to use it as parameter 'TRequest' in the generic interface 'ISharedCommandHandler<in TRequest,TResponse>'
I do not want to make any assumptions while trying to fix this :)
@kzryzstof
public interface ISharedCommandHandler<in TRequest, TResponse> : IRequestHandler<TRequest, Dto<TResponse>> where TRequest : IRequest<Dto<TResponse>>
public class XCommandRequest : IRequest<Dto<XCommandResponse>> {}
public class XCommandResponse {}
public class XCommandHandler : ISharedCommandHandler<XCommandRequest, XCommandResponse>
{
public async Task<Dto<XCommandResponse>> Handle(XCommandRequest request, , CancellationToken cancellationToken) {}
}
Yes, I have made a mistake Thanks for respond
Thanks! I am now able to reproduce the problem and will try to fix it as soon as possible.
Go to handlR not working