{"action":"created","issue":{"url":"https://api.github.com/repos/jcachat/EntityFramework.DynamicFilters/issues/68","repository_url":"https://api.github.com/repos/jcachat/EntityFramework.DynamicFilters","labels_url":"https://api.github.com/repos/jcachat/EntityFramework.DynamicFilters/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/jcachat/EntityFramework.DynamicFilters/issues/68/comments","events_url":"https://api.github.com/repos/jcachat/EntityFramework.DynamicFilters/issues/68/events","html_url":"https://github.com/jcachat/EntityFramework.DynamicFilters/issues/68","id":166019888,"number":68,"title":"Option to turn off Navigation Property Filter","user":{"login":"cavinlee","id":20510160,"avatar_url":"https://avatars.githubusercontent.com/u/20510160?v=3","gravatar_id":"","url":"https://api.github.com/users/cavinlee","html_url":"https://github.com/cavinlee","followers_url":"https://api.github.com/users/cavinlee/followers","following_url":"https://api.github.com/users/cavinlee/following{/other_user}","gists_url":"https://api.github.com/users/cavinlee/gists{/gist_id}","starred_url":"https://api.github.com/users/cavinlee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cavinlee/subscriptions","organizations_url":"https://api.github.com/users/cavinlee/orgs","repos_url":"https://api.github.com/users/cavinlee/repos","events_url":"https://api.github.com/users/cavinlee/events{/privacy}","received_events_url":"https://api.github.com/users/cavinlee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-18T05:17:44Z","updated_at":"2016-07-20T01:21:41Z","closed_at":null,"body":"Hi, \r\nMay i know how do I apply filter ONLY on the Model and not the rest of the Navigation from the Model?\r\nReason being that all my Model are partitioned.\r\n\r\nFilter on the parent will be sufficient."},"comment":{"url":"https://api.github.com/repos/jcachat/EntityFramework.DynamicFilters/issues/comments/233813281","html_url":"https://github.com/jcachat/EntityFramework.DynamicFilters/issues/68#issuecomment-233813281","issue_url":"https://api.github.com/repos/jcachat/EntityFramework.DynamicFilters/issues/68","id":233813281,"user":{"login":"cavinlee","id":20510160,"avatar_url":"https://avatars.githubusercontent.com/u/20510160?v=3","gravatar_id":"","url":"https://api.github.com/users/cavinlee","html_url":"https://github.com/cavinlee","followers_url":"https://api.github.com/users/cavinlee/followers","following_url":"https://api.github.com/users/cavinlee/following{/other_user}","gists_url":"https://api.github.com/users/cavinlee/gists{/gist_id}","starred_url":"https://api.github.com/users/cavinlee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cavinlee/subscriptions","organizations_url":"https://api.github.com/users/cavinlee/orgs","repos_url":"https://api.github.com/users/cavinlee/repos","events_url":"https://api.github.com/users/cavinlee/events{/privacy}","received_events_url":"https://api.github.com/users/cavinlee/received_events","type":"User","site_admin":false},"created_at":"2016-07-20T01:21:41Z","updated_at":"2016-07-20T01:21:41Z","body":"I checked the query generated in SQL Profiler and the filter goes to every single navigation property that i have.\r\n\r\nI have an interface that does the data partition and it applies to all entity/model that I have.\r\n\r\nExample\r\n`public class Stuff : ISeparateByPartition\r\n{\r\n    public virtual int **PartitionId** {get;set;}\r\n    public virtual int Id {get;set;}\r\n    public virtual string Name {get;set;}\r\n    public virtual Customer Customer {get;set;}\r\n    public virtual User User {get;set;}\r\n}\r\npublic class Customer : ISeparateByPartition\r\n{\r\n    public virtual int **PartitionId** {get;set;}\r\n    public virtual int Id {get;set;}\r\n    public virtual string Name {get;set;}\r\n}\r\n\r\npublic class User : ISeparateByPartition\r\n{\r\n    public virtual int **PartitionId** {get;set;}\r\n    public virtual int Id {get;set;}\r\n    public virtual string Name {get;set;}\r\n}\r\n\r\nmodelBuilder.Filter(\"PartitionFilter\", \r\n    (ISeparateByPartition entity, int partitionId) => \r\n    entity.PartitionId == partitionId, \r\n    MyContext myContext) => myContext.PartitionId);`\r\n\r\nThe DynamicParamater apply to every model when i query Stuff data."}}
{"actor":{"display_login":"cavinlee"}}