public PlanDeliveryService( IUnitOfWork unitOfWork, IDeliveryRepository deliveryRepository, IPlannedDeliveryRepository plannedDeliveryRepository) { _unitOfWork = unitOfWork; _deliveryRepository = deliveryRepository; _plannedDeliveryRepository = plannedDeliveryRepository; }
public static void Init() { //Create the Entity Frameworkd DBContext _domainDbContext = new DomainDbContext(); //Create the database _domainDbContext.Database.EnsureCreated(); //Create repositories. _deliveryRepository = new DeliveryRepository(_domainDbContext); _plannedDeliveryRepository = new PlannedDeliveryRepository(_domainDbContext); }