Exemplo n.º 1
0
        public async Task <IActionResult> GetShippingById(int shippingId)
        {
            var shipping = await repository.GetShippingByIdWithCartAndProducts(shippingId);

            if (shipping == null)
            {
                return(NotFound("There are no any shippings."));
            }

            var shippingsResource = mapper.Map <Shipping, ShippingResource>(shipping);

            return(Ok(shippingsResource));
        }