public async Task <TagResponse> GetTagAsync(int id) { var tag = await _tagBaseServices.GetFirstOrDefaultAsync(x => x.Id == id).ConfigureAwait(false); if (tag is null) { return(null); } return(new TagResponse { TagID = tag.Id, Name = tag.Name }); }
public async Task <CategoryResponse> GetCategoryAsync(int id) { var category = await _categoryBaseServices.GetFirstOrDefaultAsync(x => x.Id == id).ConfigureAwait(false); if (category is null) { return(null); } return(new CategoryResponse { CatID = category.Id, Name = category.Name }); }