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> GetPoolingCheckOutData(IMainFilterEntity mfe, bool hourlyTimeSlots
                                                                    , PoolingDataClassesDataContext db)
        {
            var q2And3 = CarParametersFilter.FilterByCarParameters(db, mfe, false);

            q2And3 = SiteParametersFilter.FilterByRentalLocation(q2And3, mfe);
            var l = _reqCo.GetReservationsWithoutLabels(q2And3, mfe,
                                                        hourlyTimeSlots ? Enums.DayActualTime.THREE : Enums.DayActualTime.THIRTY).ToList();

            var returned = l;

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