public UnitOfWork() { _context = new PumpStationContext(); _CottagerDAO = new CottagerDAO(_context); _GardenDAO = new GardenDAO(_context); _MonthDAO = new MonthDAO(_context); _StatementDAO = new StatementDAO(_context); _TariffDAO = new TariffDAO(_context); }
public List <GardenEntity> ListPlantsRequireThisSunExposure(GardenEntity.sunExposure mySun) { GardenDAO gardenDAO = new GardenDAO(); List <GardenEntity> gardenEntityList = new List <GardenEntity>(); if (gardenDAO != null) { gardenEntityList = gardenDAO.ListPlantsRequireThisSunExposure(mySun); } else { throw new Exception("GardenDAO is null. ListPlantsRequireThisSunExposure"); } return(gardenEntityList); }
public List <GardenEntity> ListPlantsInZone(GardenEntity.hardinessZone myZone) { GardenDAO gardenDAO = new GardenDAO(); List <GardenEntity> gardenEntityList = new List <GardenEntity>(); if (gardenDAO != null) { gardenEntityList = gardenDAO.ListPlantsInZone(myZone); } else { throw new Exception("GardenDAO is null. ListPlantsInZone"); } return(gardenEntityList); }
public List <GardenEntity> ListPerenial() { GardenDAO gardenDAO = new GardenDAO(); List <GardenEntity> gardenEntityList = new List <GardenEntity>(); if (gardenDAO != null) { gardenEntityList = gardenDAO.ListPerenial(); } else { throw new Exception("GardenDAO is null. ListPerenial"); } return(gardenEntityList); }
public List <GardenEntity> ViewAllPlantsInGarden() { GardenDAO gardenDAO = new GardenDAO(); List <GardenEntity> gardenEntityList = new List <GardenEntity>(); if (gardenDAO != null) { gardenEntityList = gardenDAO.ViewAllPlantsInGarden(); } else { throw new Exception("GardenDAO is null. ViewAllPlantsInGarden"); } return(gardenEntityList); }
public List <GardenEntity> PlantsToPlantInThisMonth(GardenEntity.Month thisMonth) { GardenDAO gardenDAO = new GardenDAO(); List <GardenEntity> gardenEntityList = new List <GardenEntity>(); if (gardenDAO != null) { gardenEntityList = gardenDAO.PlantsToPlantInThisMonth(thisMonth); } else { throw new Exception("GardenDAO is null. PlantsToPlantInThisMonth"); } return(gardenEntityList); }