I'm curious to know if a one to many relationship in entity framework creates another table? Or how does it work?
I have an event entity and a profile entity. When I create an event I will then add profile entities to a list/collection to the event properties RegisteredStudentIds to show who's registered.
But I don't want to create another table of profile entities, I just want to somehow link multiple profiles to that one event.
How would I create this and what would it do in the db in terms of tables created in addition to the two tables I described above (profile, event)?
Currently in my event entity I have a property called
public string RegisteredProfileIds { get; set; }
and in this string I have a string of profile ids that look like this
"12345,23234,34345,87678"
then I have to go through the process of splitting, adding to, removing from, etc, etc and then querying the id after I extract it from the string and it gets a little tedious! I'm just looking for a better solution.