User-1181987665 posted
Hi steve,
Your post is interesting but does not answer to my problem. I try to explain it again:
Think about having three entities, Company, Vehicle and Device. A Company has many Vehicles and a Vehicle has many Devices (but also Device has many Vehicles)
Then you think logging into the system with an User of the Company with ID == 11, I have to show only Vehicles related to this Company where Vehicle.Company.ID == 11. Also I have to show only Devices related to the same company where Device.Vehicles[n].Company.ID
== 11.
The problems here are two:
- how to extend the query adding this criteria?
- how to define this query that is different for every entity?
One solution I'm trying is to expose an entity model based on views that adds to every entity the company ID. But this is a dirty solution because I've to change my entity model for a technical problem.
Bye
Andrea