database design - EF Modelling Help: User with multiple Roles and Locations at a Company (Model First) -
i kind of stuck in easy modelling / design process. how design following model? i'm working entity framework 5 / model first.
- i have users working in companies.
- each user can have multiple roles in company.
- each user can work @ multiple locations company.
- a user can work @ more 1 company, , has choose in company's name acting (this important).
i designing weird looking ternary classes "userlocationcompany" has 1-n-relationships each entity (what when designing tables in db), , properties "user.currentcompany" ends having dead end @ company entity. right approach such problem?
you know better whether fits case, make location property of role? role link onto either location or perhaps 1 role can have many locations.
either way, stops repeating work of linking company , user, using existing connection add more data.
hope that's useful :)
Comments
Post a Comment