小编Ame*_*ane的帖子

使用 Dapper 映射嵌套对象列表(3 级嵌套对象)

我正在使用 Dapper,我有这样的课程:

public class Region
{
    public Region()
    {
        Countries = new List<Country>(0);
    }
    public int RegionID { get; set; }

    public int RiskRank { get; set; }

    public string Name { get; set; }

    public int SiteID { get; set; }

    public string DestinationType { get; set; }

    public string HealixCode { get; set; }

    public string AreaCode { get; set; }

    public List<Country> Countries { get; set; }
}

public class Country
{
    public Country()
    {

    }

    public …
Run Code Online (Sandbox Code Playgroud)

.net c# orm dapper asp.net-web-api2

5
推荐指数
1
解决办法
6175
查看次数

标签 统计

.net ×1

asp.net-web-api2 ×1

c# ×1

dapper ×1

orm ×1