Skip to content
This repository has been archived by the owner on Apr 5, 2019. It is now read-only.

Support for joins #23

Open
newsoftinc opened this issue Feb 4, 2016 · 0 comments
Open

Support for joins #23

newsoftinc opened this issue Feb 4, 2016 · 0 comments

Comments

@newsoftinc
Copy link

Hi,

Given the following example

modelBuilder.Conventions.Add(FilterConvention.Create<ISecuredByTenant,Guid>("SecuredByTenant",(e, SecuredByTenantId) => e.SecuredByTenantId.Equals(SecuredByTenantId)));

class A : ISecuredByTenant {
Guid TenantId {get;set;}
B NavProp {get;set;}
}
class B : ISecuredByTenant {
Guid TenantId {get;set;}
}

var ctx = new DbSampleContext();
//Filter is applied to query1
var query1 = ctx.A.ToList();

//Filter is applied to query1
var query2 = ctx.B.ToList();

//Filter is applied only to A table
var query3 = ctx.A.Include(v=>v.B).ToList();

Is it possible for the filters to be applied to every join that match a convention ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant