示例#1
0
        public static IQueryable <object> GetCollectionValues(this SapphireDbContext db,
                                                              KeyValuePair <Type, string> property, List <IPrefilterBase> prefilters)
        {
            IQueryable <object> collectionSet = db.GetValues(property);

            foreach (IPrefilter prefilter in prefilters.OfType <IPrefilter>())
            {
                collectionSet = prefilter.Execute(collectionSet);
            }

            return(collectionSet);
        }
        public static IQueryable <object> GetCollectionValues(this SapphireDbContext db, IServiceProvider serviceProvider, HttpInformation information, KeyValuePair <Type, string> property, List <IPrefilterBase> prefilters)
        {
            IQueryable <object> collectionSet = db.GetValues(property, serviceProvider, information);

            foreach (IPrefilter prefilter in prefilters.OfType <IPrefilter>())
            {
                prefilter.Initialize(property.Key);
                collectionSet = prefilter.Execute(collectionSet);
            }

            return(collectionSet);
        }