I am using Linq to SQL and trying to filter data using DataOptions and AssociateWith. I have a table called Products that has an Id primary key and a flag named IsDeleted with the sql-datatype bit.
When I use the following code, I get the "Subquery is not supported in" IsDeleted "type" Entities.Product "" exception in the AssociateWith method.
var context = new DataContext(); DataLoadOptions options = new DataLoadOptions(); options.AssociateWith<Product>(p => !p.IsDeleted); context.LoadOptions = options;
Any ideas?
exception linq-to-sql
mrtaikandi
source share