Пример #1
0
 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);
     
 }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }
Пример #4
0
        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);
        }
Пример #5
0
        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);
        }
Пример #6
0
        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);
        }