Ejemplo n.º 1
0
        /// <summary>
        /// Adds a Data Source to a DataSourceConfig
        /// </summary>
        /// <param name="list">The DataSourceList where the DataSource will be add</param>
        /// <param name="source">The IQueryable to add</param>
        /// <param name="type"></param>
        /// <returns></returns>
        public static DataSourceConfig AddSource(this DataSourceRepository list, IQueryable source, Type type)
        {
            var config = new DataSourceConfig(source, type);

            list.Add(config);
            return(config);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Adds a generic Data Source to a DataSourceConfig
        /// </summary>
        /// <typeparam name="T">The DataSource Type</typeparam>
        /// <param name="list">The DataSourceList where the DataSource will be add</param>
        /// <param name="source">The IQueryable to add</param>
        /// <returns></returns>
        public static DataSourceConfig <T> AddSource <T>(this DataSourceRepository list, IQueryable <T> source)
            where T : class
        {
            var config = new DataSourceConfig <T>(source);

            list.Add(config);
            return(config);
        }