Can a DbContext enforce a filter policy?
问题 I would like to pass a value to the ctor of a DbContext and then have that value enforce \"filtering\" on the related DbSets. Is this possible...or is there a better approach? Code might look like this: class Contact { int ContactId { get; set; } int CompanyId { get; set; } string Name { get; set; } } class ContactContext : DbContext { public ContactContext(int companyId) {...} public DbSet<Contact> Contacts { get; set; } } using (var cc = new ContactContext(123)) { // Would only return