相关疑难解决方法(0)

ORM(对象关系映射)中的"N + 1选择问题"是什么?

"N + 1选择问题"通常被称为对象关系映射(ORM)讨论中的一个问题,我理解它必须为对象中看起来很简单的事情做出大量的数据库查询.世界.

有没有人对这个问题有更详细的解释?

orm select-n-plus-1

1507
推荐指数
16
解决办法
37万
查看次数

EF6中的Eager,Lazy和显式加载

我已经阅读了本教程和本文,但我并不完全理解每种加载类型的用法.

我解释

我有这个POCO:

public partial class dpc_gestion
{
    public dpc_gestion()
    {
        this.ass_reunion_participant = new HashSet<ass_reunion_participant>();
        this.dpc_participant = new HashSet<dpc_participant>();
        this.dpc_reunion = new HashSet<dpc_reunion>();
    }

    public int dpc_id_pk { get; set; }
    public Nullable<int> dpc_id_gdp_fk { get; set; }
    public Nullable<int> dpc_id_theme { get; set; }
    public int dpc_id_animateur_fk { get; set; }
    public Nullable<System.DateTime> dpc_date_creation { get; set; }
    public Nullable<System.DateTime> dpc_date_fin { get; set; }
    public Nullable<System.DateTime> dpc_date_engag_anim { get; set; }
    public Nullable<bool> dpc_flg_let_engag_anim …
Run Code Online (Sandbox Code Playgroud)

c# orm entity-framework lazy-loading entity-framework-6

26
推荐指数
2
解决办法
1万
查看次数