public void TestReservationCheckOutDataAccess()
        {
            var mfe           = GetMainFilterExample();
            var resCarFilterQ = new ReservationsFilterCar();
            var resFilterQ    = new ReservationsSiteFilter();
            var reqCo         = new PoolingCheckOutReservations();

            var resCOSiteQ  = new ResSiteCOQueryable();
            var resCOFleetQ = new PoolingCheckOutReservationsWithLabels();

            List <DayActualEntity> dayActuals;
            List <DayActualEntity> fleet;
            List <DayActualEntity> site;

            using (var db = new PoolingDataClassesDataContext())
            {
                var q2And3 = resCarFilterQ.FilterByCarParameters(db, mfe, false);
                q2And3 = resFilterQ.FilterByRentalLocation(q2And3, mfe);


                mfe.Branch = "";
                site       = resCOSiteQ.GetQueryableCO(q2And3, mfe, Enums.DayActualTime.THREE).ToList();
                mfe.Branch = "GELEJ50";
                fleet      = resCOFleetQ.GetQueryable(q2And3, mfe, Enums.DayActualTime.THREE).ToList();


                dayActuals = reqCo.GetReservationsWithoutLabels(q2And3, mfe, Enums.DayActualTime.THREE).ToList();
            }

            TestResultComparison.CheckAllPoolingValues(dayActuals, fleet, site, "GELEJ50");
        }
        public static List <DayActualEntity> GetPoolingCheckOutDataWithLabels(IMainFilterEntity mfe, bool hourlyTimeSlots
                                                                              , PoolingDataClassesDataContext db, bool siteQ)
        {
            var q2And3 = CarParametersFilter.FilterByCarParameters(db, mfe, false);

            q2And3 = SiteParametersFilter.FilterByRentalLocation(q2And3, mfe);
            var l = siteQ
                ? _resCOSiteQ.GetQueryableCO(q2And3, mfe,
                                             hourlyTimeSlots ? Enums.DayActualTime.THREE : Enums.DayActualTime.THIRTY).ToList()
                : _resCOFleetQ.GetQueryable(q2And3, mfe,
                                            hourlyTimeSlots ? Enums.DayActualTime.THREE : Enums.DayActualTime.THIRTY).ToList();

            var returned = l;

            return(returned);
        }
 IList <DayActualEntity> GetPoolingCOData(Enums.DayActualTime tme)
 {
     using (PoolingDataClassesDataContext db = new PoolingDataClassesDataContext())
     {
         IList <DayActualEntity> l = new List <DayActualEntity>();
         try
         {
             IQueryable <App.Classes.DAL.Pooling.PoolingDataContext.Reservation> q2And3 = _resCarFilterQ.FilterByCarParameters(db, Filter, false);
             q2And3 = _resFilterQ.FilterByRentalLocation(q2And3, Filter);
             l      = _resFleetCOQ.GetQueryable(q2And3, Filter, tme).ToList();
         }
         catch (SqlException ex)
         {
             // ILog _logger = log4net.LogManager.GetLogger("Pooling");
             // if (_logger != null) _logger.Error(" SQL Exception thrown in SiteComparisonRepository accessing Reservations table, message : " + ex.Message);
         }
         return(l);
     }
 }