public async Task <Response> Handle(Request request, CancellationToken cancellationToken)
 => new Response()
 {
     Tag = TagApiModel.FromTag(await _context.Tags
                               .Include(x => x.NoteTags)
                               .Include("NoteTags.Note")
                               .Where(x => x.Slug == request.Slug)
                               .SingleAsync())
 };
 public async Task <Response> Handle(Request request, CancellationToken cancellationToken)
 => new Response()
 {
     Tag = TagApiModel.FromTag(await _context.Tags.FindAsync(request.TagId))
 };
예제 #3
0
 public async Task <Response> Handle(Request request, CancellationToken cancellationToken)
 => new Response()
 {
     Tags = await _context.Tags.Select(x => TagApiModel.FromTag(x)).ToListAsync()
 };