Example #1
0
        public Task <GetCategoryQueryResult> Execute(GetCategoryQuery query)
        {
            var data  = _dataSource.Get(query.Id);
            var model = AutoMapper.Mapper.Map <CategoryData, Category>(data);

            return(Task.FromResult(new GetCategoryQueryResult {
                Category = model
            }));
        }
Example #2
0
 public Result <Category> Get(Guid ID)
 => _dataSource.Get(ID);