cost 87 ms
使用实体框架核心加载导航属性值而不通过数据库上下文 - Load a navigation property value using entity framework core without going through DB context

TL;DR:在实体上加载单个导航属性的最简洁方法是什么? 假设我已经有一个带有子Child的实例实体Foo 。 我拥有的Foo实例设置了ChildId但未加载Child ,即foo.ChildId == 1234但foo.Child == null 。 如果它丢失了,我Child它。 我知道我能做 ...

是否可以配置 Entity Framework Core >= 7.0 以使用 List<t> 而不是哈希集<t>通过配置?</t></t> - Is it possible to configure Entity Framework Core >= 7.0 to use List<T> instead of HashSet<T> by configuration?

Entity Framework &gt;= 7.0 提供HashSet&lt;T&gt;作为1-n和mn关联(即集合)的实现。 在我的例子中,这些关联的类型为ICollection&lt;T&gt; ,而HashSet&lt;T&gt;对我不起作用,因为JSON PATCH ( RFC 690 ...


排序:
质量:
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM