Exemple #1
0
        public void Should_filter_based_on_specific_value_with_mapping()
        {
            using (var context = new ExampleContextWithMapping())
            {
                context.EnableFilter("BadCategory");

                var blogEntries = context.BlogPoster
                                  .ToList();

                Assert.Equal(1, blogEntries.Count);
            }
        }
        public void Should_filter_based_on_specific_value_with_mapping()
        {
            using (var context = new ExampleContextWithMapping())
            {
                context.EnableFilter("BadCategory");

                var blogEntries = context.BlogPoster
                    .ToList();

                Assert.Equal(1, blogEntries.Count);
            }
        }
Exemple #3
0
        public void Should_filter_based_on_global_value_with_mapping()
        {
            using (var context = new ExampleContextWithMapping())
            {
                var tenant = context.Leietagere.Find(1);
                context.CurrentLeietager = tenant;
                context.EnableFilter("Tenant")
                .SetParameter("leietagerId", tenant.LeietagerId);

                Assert.Equal(1, context.BlogPoster.Count());
            }
        }
        public void Should_filter_based_on_global_value_with_mapping()
        {
            using (var context = new ExampleContextWithMapping())
            {
                var tenant = context.Leietagere.Find(1);
                context.CurrentLeietager = tenant;
                context.EnableFilter("Tenant")
                    .SetParameter("leietagerId", tenant.LeietagerId);

                Assert.Equal(1, context.BlogPoster.Count());
            }
        }