Hi,
I'm currently trialing LLBLGen Pro to see if there is a way to handle record filtering (based on a user's access rights) in a central place. Our Firebird database currently uses updatable views to achieve this, and this was problematic in Microsoft Entity Framework as views seemed to be read-only, relationships get lost, etc.
With LLBLGen I seem to have similar problems:
- Entities mapped to views have all fields "not null" and this cannot be overridden as EF complains about the mismatch.
- PK's / FK's must be manually maintained.
- Mapping to the underlying table (to retrieve the schema information) and then simply repointing to the view seems to produce an invalid EDMX.
Desperate for a solution, I've discovered the Authorizers and whilst I'm not keen on the extra overhead of filtering records client-side, if they can act as a "catch all" for all scenarios including lazy loading I will consider it.
My questions:
1. Have I missed something in how to map entities to views?
2. Are there other tricks I could employ?
3. Will injecting CanLoadEntity 100% prevent materialization of entities that should not be accessible?
4. The sample Authorizer code in the LLBLGen documentation makes use of EntityType, which I can't see defined in my generated code. I just found System.Data.Metadata.Edm.EntityType which appears to be something different?
Thanks!