Beispiel #1
0
        public BlogContext(string connectionString)
        {
            _connectionString = connectionString;
            this.JavaBlogs    = FilteredDbSet <Blog> .Create <Blog>(this, x => x.Name.Contains("Java"));

            this.DotNetBlogs = FilteredDbSet <Blog> .Create <Blog>(this, x => x.Name.Contains(".NET"));
        }
 public static DbSet <T> FilteredSet <T>(this DbContext context, Expression <Func <T, bool> > filter) where T : class
 {
     return(FilteredDbSet <T> .Create <T>(context, filter));
 }