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

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