Example #1
0
        /// <summary>
        /// Gets the specified options.
        /// </summary>
        /// <param name="options">The options.</param>
        /// <returns></returns>
        public virtual T Get(QueryOptions <T> options)
        {
            IQueryable <T> query = BuildQuery(options);

            return(query.FirstOrDefault());
        }
Example #2
0
        /// <summary>
        /// Lists the specified options.
        /// </summary>
        /// <param name="options">The options.</param>
        /// <returns></returns>
        public virtual IEnumerable <T> List(QueryOptions <T> options)
        {
            IQueryable <T> query = BuildQuery(options);

            return(query.ToList());
        }