public void Expression_from_instance_delegate() { using (var context = new SimpleModelContext()) { var testInstance = new InstanceExpressions(); var products = context.Products.Where(testInstance.Delegate()); Assert.DoesNotThrow(() => products.ToList()); } }
public void Expression_embedded_instance_delegate() { using (var context = new SimpleModelContext()) { var testInstance = new InstanceExpressions(); var products = context.Products .Where(p => context.Products.Where(testInstance.Delegate()) .Contains(p)); products.ToList(); } }
public void Expression_embedded_instance_delegate() { using (var context = new SimpleModelContext()) { var testInstance = new InstanceExpressions(); var products = context.Products .Where(p => context.Products.Where(testInstance.Delegate()) .Contains(p)); Assert.DoesNotThrow(() => products.ToList()); } }