【问题标题】:Insert 2 entity value in odata in single post在单个帖子中的 odata 中插入 2 个实体值
【发布时间】:2014-09-24 20:56:11
【问题描述】:

我有两个实体

Public Class Order
{
Public int Id{get;set;}
public string Name{get; set;}
public List<OrderDetail> {get;set;}
}

Public Class OrderDetail
{
Public int Id{get;set;}
public string Item{get;set;}
public float Amount{get;set;}

public int Order{get;set;
}

我创建了 asp.net webapi Odata 服务 我想在单个发布请求中插入两个表数据

【问题讨论】:

    标签: c# asp.net-web-api odata


    【解决方案1】:

    批处理是一个很好的建议,深度插入也是如此。有关将深度插入与 Web API OData 一起使用的更多详细信息,请参阅 POSTing an entity type with children to an (MVC Web Api) OData service

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多