Exemplo n.º 1
0
        public async Task <Category> GetCategoryAsync(string categoryCode)
        {
            var request = new GetCategory.Request {
                CategoryCode = categoryCode
            };

            setupPermissions(request);
            return((await _dispatcher.DispatchAsync <GetCategory.Request, GetCategory.Response>(request)).Category);
        }
Exemplo n.º 2
0
        public Category GetCategory(string categoryCode)
        {
            var request = new GetCategory.Request {
                CategoryCode = categoryCode
            };

            setupPermissions(request);
            return(_dispatcher.Dispatch <GetCategory.Request, GetCategory.Response>(request).Category);
        }