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 interface ISharedCommandHandler<in TRequest, TResponse> : IRequestHandler<TRequest, Dto<TResponse>> where TRequest : IRequest<Dto<TResponse>>
public class XCommandRequest : IRequest<XCommandResponse> {}
public class XCommandResponse {}
public class XCommandHandler : ISharedCommandHandler<XCommandRequest, XCommandResponse>
{
public async Task<Dto<XCommandResponse>> Handle(XCommandRequest request, , CancellationToken cancellationToken) {}
}
Go to handlR not working
The text was updated successfully, but these errors were encountered:
@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 :)
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) {}
}
Go to handlR not working
The text was updated successfully, but these errors were encountered: