Exemple #1
0
        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));
        }
Exemple #2
0
 public async Task <Category> GetAsync(ICategoryIdentity categoryId)
 {
     return(await this.CategoryDataAccess.GetAsync(categoryId));
 }
Exemple #3
0
 public async Task <Category> GetAsync(ICategoryIdentity categoryId)
 {
     return(Mapper.Map <Category>(await Get(categoryId)));
 }