Пример #1
0
        public ActionResult GetServerError()
        {
            var thing = _dataAccess.GetProductByIdAsync(42);

            var thingToReturn = thing.ToString();

            return(Ok());
        }
Пример #2
0
        public async Task <ActionResult <ProductToReturnDto> > GetProduct(int id)
        {
            var product = await _dataAccess.GetProductByIdAsync(id);

            var data = _mapper.Map <Product, ProductToReturnDto>(product);

            return(Ok(data));
        }