Exemplo n.º 1
0
        public ActionResult <IEnumerable <Delivery> > GetDeliveriesForUser(int Userid)
        {
            try
            {
                var deliveries = deliveryRepository.GetAllDeliveriesAsUser(Userid);

                if (deliveries != null)
                {
                    return(Ok(deliveries));
                }
                else
                {
                    return(NotFound());
                }
            }
            catch (Exception ex)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError, ex.Message));
            }
        }