public async Task <GetTagByIdResponse> Handle(GetTagByIdRequest request) { return(new GetTagByIdResponse() { Tag = TagApiModel.FromTag(await _context.Tags.FindAsync(request.Id)) }); }
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() }); }