Exemplo n.º 1
0
        public IHttpActionResult Get(int distritoId, int baseId, int transportistaId, int orderId)
        {
            var orderDetails = RoutingService.GetOrderDetails(orderId)
                               .Where(o => o.Estado == OrderDetail.Estados.Pendiente)
                               .Select(e => MapperDetail.EntityToModel(e, new OrderDetailModel()));

            return(Ok(orderDetails.ToList()));
        }
Exemplo n.º 2
0
        public IHttpActionResult Get(int id, [FromUri] int[] insumos)
        {
            var orderDetails = RoutingService.GetOrderDetails(id)
                               .Where(o => o.Estado == OrderDetail.Estados.Pendiente)
                               .WhereIf(insumos.Length > 0, od => insumos.Contains(od.Insumo.Id))
                               .Select(e => MapperDetail.EntityToModel(e, new OrderDetailModel()));

            return(Ok(orderDetails.ToList()));
        }