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