简体   繁体   中英

Entity Framework - Default Child Objects

有没有一种方法可以为新实体设置默认子实体,而不必使用ObjectQueries查询所有子实体?

Sort of. You can set the EntityKey directly. This means you will not be able to access the value of the child entity, but sometimes you don't need to do that. There is information about doing this in this post .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM