首页 > 解决方案 > 在包含其他模型列表的模型列表中发送帖子数据

问题描述

我需要发送包含模型数据的发布请求,其中包含其他模型列表

使用 chrome 的“rested”等工具请求的正确格式?

public class ModelTestRequest
{
    List<ModelTestChild> GoodList { get; set; }

}
public class ModelTestChild
{
    public int id { get; set; }
    public string description { get; set; }
}
public class Modeltestresponse
{
    public List<ModelTestChild> GoodList2 { get; set; }
} 


public Modeltestresponse SpecialName(ModelTestRequest model)
{

}

标签: asp.netasp.net-web-apimodel

解决方案


发布数据,就像您在 JSON 中需要它一样?


推荐阅读