I have the following master & child tables (All of them require ADD/EDIT/DELETE)
tblSchool
tblStudent
tblClass
tblTests
|
> tblSchoolClass
> tblClassStudent
> tblStudentTest
So, while specifying a new ADO.net Data Entity model, Do i need to select ALL the tables or group and select them (creating 2 or more models in the process) ?
(Disclaimer开发者_运维知识库 : ASP.net MVC newbie)
As Ladislav as answered, select all your tables and put them in a single model. If you have the relationships (primary and foreign keys) setup correctly in the database, these will be created in your entity model as well.
Creating two models would serve no purpose other than to make your life more difficult. I have used separate models only when I am dealing with multiple databases. In your case, it sounds like you only have one database.
精彩评论