Пример #1
0
        public async Task <APIResult> GetAll()
        {
            var rs = await productQueries.GetAllAsync();

            return(new APIResult()
            {
                Result = 0,
                Data = rs
            });
        }
Пример #2
0
        public async Task <ActionResult> GetByAsync()
        {
            try
            {
                var products = await _productQueries.GetAllAsync();

                return(Ok(products));
            }
            catch
            {
                return(NotFound());
            }
        }