Hello,
I have following schema:
Clients - ClientId Users - UserId Offices - OfficeId
ClientOffices - ClientId, OfficeId UserOffices - UserId, OfficeId
Bold entities are EntityFramework Entities.
Now I need to write a function which accepts UserId and returns a list of Clients - who also belong to the offices to which user belongs.
E.g., Say ABC Inc. works with London Office, XYZ Inc. works with New York office. User "Yakoon" works only for Lond Office.
The linq statement when executed should only return ABC Inc. If "Yakoon" belongs to New York office as well, then it should return btoh ABC and XYZ Inc.
Thanks