private async Task <Entities.Category> Get(ICategoryIdentity categoryId) { if (categoryId == null) { throw new ArgumentNullException(nameof(categoryId)); } return(await Context.Category .FirstOrDefaultAsync(m => m.Id == categoryId.Id)); }
public async Task <Category> GetAsync(ICategoryIdentity categoryId) { return(await this.CategoryDataAccess.GetAsync(categoryId)); }
public async Task <Category> GetAsync(ICategoryIdentity categoryId) { return(Mapper.Map <Category>(await Get(categoryId))); }