///<Summary> ///Collection<T> ///This method returns the collection of T objects, ordered and filtered by optional criteria ///</Summary> ///<returns> ///IList<T> ///</returns> ///<parameters> ///object o (ICriteria) ///</parameters> public virtual IList <T> Collection <T>(object o) { Doing(this); try { ICriteria icriteria = (ICriteria)o; IList <T> boSuppliersCollection = new List <T>(); IList <IDataCriterion> lstDataCriteria = (icriteria == null) ? null : icriteria.ListDataCriteria(); IList <IDataOrderBy> lstDataOrder = (icriteria == null) ? null : icriteria.ListDataOrder(); IDataSkip dataSkip = (icriteria == null) ? null : icriteria.DataSkip(); IDataTake dataTake = (icriteria == null) ? null : icriteria.DataTake(); IList <IDAOSuppliers> daoSuppliersCollection = _iSuppliersRepository.SelectAllByCriteria(lstDataCriteria, lstDataOrder, dataSkip, dataTake); foreach (IDAOSuppliers resdaoSuppliers in daoSuppliersCollection) { boSuppliersCollection.Add((T)(object)new BOSuppliers(resdaoSuppliers)); } return(boSuppliersCollection); } catch (Exception ex) { Failed(this, ex); Handle(this, ex); return(null); } }