Exemplo n.º 1
0
        public void Expression_from_static_delegate()
        {
            using (var context = new SimpleModelContext())
            {
                var products = context.Products.Where(StaticExpressions.Delegate());

                Assert.DoesNotThrow(() => products.ToList());
            }
        }
Exemplo n.º 2
0
        public void Expression_embedded_static_delegate()
        {
            using (var context = new SimpleModelContext())
            {
                var products = context.Products
                               .Where(p => context.Products.Where(StaticExpressions.Delegate())
                                      .Contains(p));

                products.ToList();
            }
        }