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(); }
public int MerchantListCount() { int _result = 0; MerchantFilterRepo <REFMERCHANTS, REFMERCHANTS> merchantRepo = new MerchantFilterRepo <REFMERCHANTS, REFMERCHANTS>(ent); _result = merchantRepo.GetMerchantFilterAmount <REFMERCHANTS>(); return(_result); }
public int GetMerchantFilterAmount() { int result_ = 0; MerchantFilterRepo <KEY_CLIENTS, REFMERCHANTS> MerchantFilter = new MerchantFilterRepo <KEY_CLIENTS, REFMERCHANTS>(ent); result_ = MerchantFilter.GetMerchantFilterAmount <KEY_CLIENTS>(); return(result_); }
//bind K of REFMERCHANTS with method public IQueryable <T> GetByMerchants <T>() where T : class, IMerchant { IQueryable <T> _result = null; MerchantFilterRepo <T, REFMERCHANTS> merchantRepo = new MerchantFilterRepo <T, REFMERCHANTS>(ent); _result = merchantRepo.GetByMerchantFilter <T>(); return(_result); }
public IQueryable <IMerchant> FilterByMerchant <T>() where T : class, IMerchant { IQueryable <IMerchant> result_ = null; MerchantFilterRepo <T, REFMERCHANTS> MerchantFilter = new MerchantFilterRepo <T, REFMERCHANTS>(ent); result_ = MerchantFilter.GetByMerchantFilter <T>(); return(result_); }