Example #1
0
        public static void ReadRepoCheck()
        {
            SQL_entity         ent     = new SQL_entity();
            ReadRepo <T_ACQ_D> readRep = new ReadRepo <T_ACQ_D>(ent);
            MerchantFilterRepo <KEY_CLIENTS, REFMERCHANTS> filtRep = new MerchantFilterRepo <KEY_CLIENTS, REFMERCHANTS>(ent);
            DateFilterRepo <T_ACQ_D>  dateFilter = new DateFilterRepo <T_ACQ_D>(ent);
            ChainingRepo <TEMP_ACQ_D> chainRep   = new ChainingRepo <TEMP_ACQ_D>(ent);

            DateTime stDt = new DateTime(2016, 08, 21, 00, 00, 00);
            DateTime fnDt = new DateTime(2016, 08, 22, 00, 00, 00);

            DateTime st = new DateTime(2016, 02, 01, 00, 00, 00);
            DateTime fn = new DateTime(2016, 06, 01, 00, 00, 00);

            //48
            int cnt_1 = readRep.GetByFilter <T_ACQ_D>(s => s.MERCHANT == 9294109921).Count();

            //50830
            int cnt_2 = dateFilter.GetByDate(stDt, fnDt).Count();
            //128
            int cnt_3 = filtRep.GetByMerchantFilter <T_ACQ_D>().Count();

            //2042
            int cnt_4 = chainRep.FilterByDate(st, fn)._result.Count();
            //597
            int cnt_5 = chainRep.FilterByMerchants <REFMERCHANTS>()._result.Count();
        }
Example #2
0
        public IEnumerable <T> GetByDate <T>(DateTime dateStart, DateTime dateFinal) where T : class, IDate
        {
            IEnumerable <T>    _result = null;
            DateFilterRepo <T> rr      = new DateFilterRepo <T>(ent);

            _result = rr.GetByDate(dateStart, dateFinal).ToList();
            return(_result);
        }