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:
Offices : a. id b. Name
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.
精彩评论