Esempio n. 1
0
 public OrdersController(OrderContext orderContext, AddressContext addressContext, ProductContext productContext, DeliveryAreaContext deliveryAreaContext)
 {
     _orderContext        = orderContext;
     _addressContext      = addressContext;
     _productContext      = productContext;
     _deliveryAreaContext = deliveryAreaContext;
 }
Esempio n. 2
0
        public string GetAreaNameFromId(int id, DeliveryAreaContext deliveryAreaContext)
        {
            var area = deliveryAreaContext.DeliveryAreas.FirstOrDefault(x => x.Id == id);

            return(area?.Name);
        }
 public DeliveryAreaController(DeliveryAreaContext context)
 {
     _context = context;
 }