public async Task <IPager <City> > FindAll(IPager <City> pager) { string storedProcedure = String.Empty; //CMDText += ORDERBY_STMT + OrderBy; MapToObject = new CityMapToObject(logger); storedProcedure = Settings.Database.StoredProcedures.FirstOrDefault(p => p == FINDALL_PAGEDPROC); if (storedProcedure == null) { SqlCommandType = Constants.DBCommandType.SQL; CMDText = String.Format(FINDALLPAGER_STMT, pager.PageSize * pager.PageNbr, pager.PageSize); pager.Entities = await base.FindAll(); } else { SqlCommandType = Constants.DBCommandType.SPROC; CMDText = storedProcedure; pager.Entities = await base.FindAllPaged(pager.PageSize *pager.PageNbr, pager.PageSize); } CMDText = FINDALLCOUNT_STMT; pager.RowCount = await base.FindAllCount(); return(pager); }
public override async Task <City> FindByPK(IPrimaryKey pk) { SqlCommandType = Constants.DBCommandType.SQL; CMDText = FINDBYPK_STMT; MapToObject = new CityMapToObject(logger); return(await base.FindByPK(pk)); }
public override async Task <ICollection <City> > FindAll() { CMDText = FINDALL_STMT; CMDText += ORDERBY_STMT + OrderBy; MapToObject = new CityMapToObject(logger); return(await base.FindAll()); }
public override async Task <ICollection <City> > FindAll() { SqlCommandType = Constants.DBCommandType.SQL; CMDText = FINDALL_STMT; CMDText += ORDERBY_STMT + OrderBy; MapToObject = new CityMapToObject(logger); return(await base.FindAll()); }
public IPager <City> FindAll(IPager <City> pager) { SqlCommandType = Constants.DBCommandType.SQL; CMDText = String.Format(FINDALLPAGER_STMT, pager.PageSize, pager.PageSize * pager.PageNbr); //CMDText += ORDERBY_STMT + OrderBy; MapToObject = new CityMapToObject(logger); pager.Entities = base.FindAll(); CMDText = FINDALLCOUNT_STMT; pager.RowCount = base.FindAllCount(); return(pager); }
public override async Task <City> FindByPK(IPrimaryKey pk) { CMDText = FINDBYPK_STMT; MapToObject = new CityMapToObject(logger); return(await base.FindByPK(pk)); }