예제 #1
0
파일: REPO.cs 프로젝트: imp908/fileshare
        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();
        }
예제 #2
0
파일: REPO.cs 프로젝트: imp908/fileshare
        public ChainingRepo <IChainable> FilterByDate(DateTime st, DateTime fn)
        {
            ChainingRepo <IChainable> _result = new ChainingRepo <IChainable> (this._context);

            if (this._result == null)
            {
                this._result = from s in this._dbSet where s.DATE >= st && s.DATE <= fn select s;
            }
            _result._result = from s in this._result where s.DATE >= st && s.DATE <= fn select s;
            return(_result);
        }
예제 #3
0
파일: REPO.cs 프로젝트: imp908/fileshare
        public new ChainingRepo <IChainable> GetAll()
        {
            ChainingRepo <IChainable> _result = new ChainingRepo <IChainable>(this._context);

            if (this._result == null)
            {
                this._result = from s in this._dbSet select s;
            }
            _result._result = from s in this._result select s;
            return(_result);
        }
예제 #4
0
파일: REPO.cs 프로젝트: imp908/fileshare
        public ChainingRepo <IChainable> FilterByMerchants <K>() where K : class, IMerchant
        {
            ChainingRepo <IChainable> _result = new ChainingRepo <IChainable>(this._context);
            DbSet <K> filter_mercahnt         = this._context.Set <K>();

            if (this._result == null)
            {
                this._result = from s in this._dbSet where s.MERCHANT == 929 select s;
            }
            _result._result = from s in this._result join t in filter_mercahnt on s.MERCHANT equals t.MERCHANT select s;
            return(_result);
        }