I am very new to MVC so I have some confusions regarding models when we have relations between multple tables.Formally I was using views or stored procedures of sql to manipulate data but now I am using Entity Framework so confused how my model should look like ?
I have a table for Users , UserImages , UserRoles . UserImages and UserRoles is referring to UserID from Users table.I am not sure how my model should be ? While displaying data I generally use a view created in sql server by joining these 2 tables. And when an user is edited or created I update these 3 tables.
Not sure what should my model look like in this case ? Do I create a sql server view and add it to edmx ? Or add 3 tables seperately in EDMX and create custom properties in User model for those other 2 tablels?
View Complete Post