public IEnumerable <T> SkipTable <T>(int page, int initialSizeItem, out long recordCount, Expression <Func <T, bool> > predicate = null) { if (predicate != null) { //convert type var filterPredicate = PredicateExtensions.ConvertTypeExpression <ScrollLineDTO, krt_Naftan>(predicate.Body); recordCount = this._engage.GetCountRows(filterPredicate); return((IEnumerable <T>)Mapper.Map <IEnumerable <ScrollLineDTO> >(this._engage.GetSkipRows(page, initialSizeItem, x => x.KEYKRT, filterPredicate))); } recordCount = this._engage.GetCountRows <krt_Naftan>(x => true); return((IEnumerable <T>)Mapper.Map <IEnumerable <ScrollLineDTO> >(this._engage.GetSkipRows <krt_Naftan, long>(page, initialSizeItem, x => x.KEYKRT))); }