开发者

How to share table property between two tables in ADO Entity Data?

i'm ha开发者_StackOverflowving a little problem in my project. i'm using ADO.Net Entity Data Model, let's say i have 2 Tables:

  1. Offices : a. id b. Name

  2. Requests: a. rid b.fname c.lname d.mobile

i want the requests table will have a relations to the offices table that each row in requests will have the id of the one of the tables. i tried to do 1 to many relations but it didn't work , i just couldnt add data to the table.

thanks for your guidence


Your Requests table needs to have a field to relate back to the offices table. Which typically should be named OfficeID or something similar. Add that field and create the relationship from Offices.ID to Requests.OfficeID and it will work fine.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜