コード例 #1
0
        /// <summary>
        /// Return all entities from db collection
        /// </summary>
        /// <returns></returns>
        public virtual List <T> GetAll(Expression <Func <T, object> > @select = null, QueryOptions queryOptions = null)
        {
            var query = new SQLinq <T>();

            if (select != null)
            {
                query = query.Select(@select);
            }
            return(Using(connection =>
            {
                var data = connection.Query(query.ApplyQueryOptions(queryOptions));
                return data.ToList();
            }));
        }