Created
October 14, 2021 08:06
-
-
Save jonhilt/106a97d99b01c9e112c51f3ed68d9c88 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace MessagingTestApp.Features.Mesgs | |
{ | |
public class List | |
{ | |
public class Query : IRequest<Model> | |
{ | |
} | |
public class Model | |
{ | |
public List<string> Mesgs { get; set; } | |
} | |
// add this nested class... | |
public class QueryHandler : IRequestHandler<Query, Model> | |
{ | |
public async Task<Model> Handle(Query request, CancellationToken cancellationToken) | |
{ | |
return new Model | |
{ | |
Mesgs = new List<string> | |
{ | |
"One from the server", | |
"Two from the server", | |
"Three from the server", | |
"Four" | |
} | |
}; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment