static void SubFilter() { var subFilter = new FilterLite <Product>() .Where(ProductFields.SupplierId, 1) .Or(ProductFields.SupplierId, OperatorLite.IsNull); // SELECT * FROM dbo.Products WHERE CategoryId = 1 AND (SupplierId = 1 OR SupplierId = 2) IList <Product> products = ds.ProductRepository.Query(Projection.BaseTable) .Where(ProductFields.CategoryId, 1) .And(subFilter) .ToList(); }
static void SubFilter() { var subFilter = new FilterLite<Product>() .Where(ProductFields.SupplierId, 1) .Or(ProductFields.SupplierId, OperatorLite.IsNull); // SELECT * FROM dbo.Products WHERE CategoryId = 1 AND (SupplierId = 1 OR SupplierId = 2) IList<Product> products = ds.ProductRepository.Query(Projection.BaseTable) .Where(ProductFields.CategoryId, 1) .And(subFilter) .ToList(); }