I'm starting to use Entity Framework. Let's say I have to Entity from my tables in DB.
Here is the table schema
Profiles
- ProfileId
- FirstName
- LastName
Hobbies
- Id
- HobbyName
- OwnerId
So one profile can have many hobbies.
My Entity Framework:
ProfileEntity
- ProfileId
- FirstName
- LastName
- Hobbies (collection of HobbyEntity) note: this created by the Association tool
HobbyEntity
- Id
- HobbyName
- Owner (type of ProfileEntity) note: this created by the Association tool, for me this property is not important
my question: should I use the "Association" tool to make the relationship between the two entities, which in result create a property of each entity (in ProfileEntity will create a HobbyEntity and vica versa) or should I not use the association and only add a scalar property manually such as List<HobbyEntity>
in my ProfileEntity and OwnerId in HobbyEntity.