开发者

Select All tables / not?

开发者 https://www.devze.com 2023-04-07 16:19 出处:网络
I have the following master & child tables (All of them require ADD/EDIT/DELETE) tblSchool tblStudent

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消