added snippet for Comand&Query handlers #9
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
How to create snippets: https://snippet-generator.app/
https://snippet-generator.app/?description=QueryHandler&tabtrigger=qhandler&snippet=using+System.Collections.Generic%3B%0Ausing+System.Threading%3B%0Ausing+System.Threading.Tasks%3B%0Ausing+Domain%3B%0Ausing+MediatR%3B%0Ausing+Microsoft.EntityFrameworkCore%3B%0Ausing+Persistence%3B%0Ausing+Microsoft.Extensions.Logging%3B%0Ausing+System%3B%0A%0Anamespace+Application.Activities%0A%7B%0A++++public+class+List%0A++++%7B%0A++++++++public+class+Query+%3A+IRequest%3C%24%7B1%3Aexample%7D%3E+%0A++++++++%7B+%0A++++++++%7D%0A%0A++++++++public+class+Handler+%3A+IRequestHandler%3CQuery%2C+%24%7B1%3Aexample%7D%3E%0A++++++++%7B%0A++++++++++++private+readonly+FacebukDbContext+_context%3B%0A++++++++++++public+Handler%28FacebukDbContext+context%29%0A++++++++++++%7B%0A++++++++++++++++_context+%3D+context%3B%0A++++++++++++%7D%0A%0A++++++++++++public+async+Task%3C%24%7B1%3Aexample%7D%3E+Handle%28Query+request%2C+CancellationToken+cancellationToken%29%0A++++++++++++%7B%0A+++++++++++++++%2F%2FLogic+here%0A++++++++++++%7D%0A++++++++%7D%0A++++%7D%0A%7D&mode=vscode