Esempio n. 1
0
        public async Task <IActionResult> GetShippingsByUser(string userId)
        {
            var shippings = await repository.GetShippingsByUser(userId);

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

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

            return(Ok(shippingsResource));
        }