Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/282.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# asp.net核心模型类中的问题_C#_Entity Framework - Fatal编程技术网

C# asp.net核心模型类中的问题

C# asp.net核心模型类中的问题,c#,entity-framework,C#,Entity Framework,这是我的模型课。 在RootObject类中,我有一个Trans class的列表。在.NETCore中,当我通过Postman将值传递给RootObject时,我在RootObject中得到null public class Trans { public string SubDetailID { get; set; } public string TrnType { get; set; } public decimal amount { get; set; }

这是我的模型课。 在RootObject类中,我有一个Trans class的列表。在.NETCore中,当我通过Postman将值传递给RootObject时,我在RootObject中得到null

    public class Trans
{
    public string SubDetailID { get; set; }
    public string TrnType { get; set; }
    public decimal amount { get; set; }
    public string BankCurrencyRate { get; set; }
    public decimal AccountID { get; set; }
    public string Currency { set; get; }
    public string CurrencyRate { set; get; }
    public decimal JVID { get; set; }
    public string coa { get; set; }
    public decimal BusinessID { get; set; }

}

public class RootObject
{
    public int JVID { get; set; }
    public string InvoiceRef { get; set; }
    public DateTime JVDate { get; set; }
    public string StoreID { get; set; }
    public decimal BusinessID { get; set; }
    public string UserID { get; set; }
    public string Currency { get; set; }
    public string Rate { get; set; }
    public DateTime DueDate { get; set; }
    public string Reference { get; set; } = "Client";
    public decimal RefID { get; set; }
    public string Narration { get; set; }
    public string Type { get; set; } = "CA";
    public virtual List<Trans> transaction { get; set; }
}
公共类传输
{
公共字符串SubDetailID{get;set;}
公共字符串trtype{get;set;}
公共十进制数{get;set;}
公共字符串BankCurrencyRate{get;set;}
公共十进制帐户ID{get;set;}
公共字符串货币{set;get;}
公共字符串CurrencyRate{set;get;}
公共十进制JVID{get;set;}
公共字符串coa{get;set;}
公共十进制BusinessID{get;set;}
}
公共类根对象
{
公共int JVID{get;set;}
公共字符串InvoiceRef{get;set;}
公共日期时间JVDate{get;set;}
公共字符串StoreID{get;set;}
公共十进制BusinessID{get;set;}
公共字符串用户标识{get;set;}
公共字符串货币{get;set;}
公共字符串速率{get;set;}
公共日期时间DueDate{get;set;}
公共字符串引用{get;set;}=“Client”;
公共十进制RefID{get;set;}
公共字符串旁白{get;set;}
公共字符串类型{get;set;}=“CA”;
公共虚拟列表事务{get;set;}
}

这只是一个数据结构,没有任何操作。邮递员之类的东西是没有定义的。给我们看一个邮递员调用的例子,这些只是类。