python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
C# MediatR: Return nested/compound DTO
I want to return a compound/nested DTO SearchDto which includes Status(timeMs, resultsFound) and List<SearchResult>.
Example JSON DTO
{
status: {
timeMs: 0.038583,
found: 728,
...
Luke Martin
Votes: 0
Answers: 1
Cannot access method 'Handle' MediatR due to its protection level .net using xunit
I want to test a handler that is protected due to the AsyncRequestHandler interface in MediatR.Here is my handler :
public sealed class AddUserDeviceCommandHandler : AsyncRequestHandler<AddUserDevi...

Ehsan Akbar
Votes: 0
Answers: 1
MediatR IPipelineBehavior<TRequest, TResponse> errors as The type 'TRequest' cannot be used as type parameter 'TRequest' in the generic type or method
I'm using MediatR to do Request - Response logging in my application using IPipelineBehavior<TRequest, TResponse>
Code Sample:
internal sealed class AppLoggingBehavior<TRequest, TResponse>...

fingers10
Votes: 0
Answers: 2
Mediatr - when throwing an exception from command handler app crashes and the exception remains unhandled
public class Manager(IMediator mediatr)
{
try
{
mediatr.Send(new DummyCommand());
}
catch (Exception ex)
{
// Never gets called!
}
}
public class DummyCommand...
GeorgeR
Votes: 0
Answers: 0