开发者

Entity Framework: table1_table2id mapping to table2_id

开发者 https://www.devze.com 2023-01-02 14:51 出处:网络
Lets s开发者_运维技巧ay I have two tables like this: person: id, first_name, last_name, phone_id

Lets s开发者_运维技巧ay I have two tables like this: person: id, first_name, last_name, phone_id

phone: id, phone_number

person.phone_id is always equal to a phone.id. Instead of my entity showing person.phone_id, I'd like it to show person.phone_number. How can I accomplish this?


That's called "Entity Splitting." It's a moderately advanced technique, but it's possible.

Note that you should already have a person.phone.phone_number.

0

精彩评论

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