asp.net - 在包含其他模型列表的模型列表中发送帖子数据
问题描述
我需要发送包含模型数据的发布请求,其中包含其他模型列表
使用 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)
{
}
解决方案
发布数据,就像您在 JSON 中需要它一样?
推荐阅读
- php - 使用 PHP-debug ATOM 包设置 PHP xdebug
- c# - 查找字符串中具有特定字母的所有单词
- jquery - 通过在 MVC 中使用 Jquery 和 ajax 进行搜索来获取 html 表中的值
- ios - 如何在 CollectionViewCell 中动态调整 UITextView 字体大小?
- javascript - Javascript:在 Firefox 上查询剪贴板权限不起作用
- android - 如何收到另一个应用程序崩溃的通知?
- java - 在 android studio 中生成签名的 apk 时找不到类型“libcore.io.Memory”
- java - Java - 确切含义 http.maxConnections
- ios - 如何最好地删除所有 UIViewcontrollers 并转到单个 UIViewController?
- python - Flask 字段值检查