Exemple #1
0
 public async Task <GetTagByIdResponse> Handle(GetTagByIdRequest request)
 {
     return(new GetTagByIdResponse()
     {
         Tag = TagApiModel.FromTag(await _context.Tags.FindAsync(request.Id))
     });
 }
Exemple #2
0
            public async Task <Response> Handle(Request request)
            {
                var tags = await _context.Tags
                           .Where(x => x.IsDeleted == false)
                           .ToListAsync();

                return(new Response()
                {
                    Tags = tags.Select(x => TagApiModel.FromTag(x)).ToList()
                });
            }