Hi I looked at lot of examples online using Repository Pattern with EF. But none of them really talked about working with Related Entities.
Like say User can have multiple addresses.
IUserRepository
User CreateUser();
void UpdateUser();
Now if I were to add a Address to the User should, should it be on the Repository? OR on the User instance
I feel repository pattern shud be used for CRUD and Get Operations on the entity. But when it comes to working with related entities, they should really be defined on the entity[for the most part]
Like in this scenario, address is useless without a user, shouldnt it be on the entity?
any thoughts?