Reputation: 983
i have a two entity
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;
}
and i create asp.net webapi Odata service and i want to insert both table data in single post request
Upvotes: 1
Views: 2413
Reputation: 4336
Batch is a fine suggestion, as is deep insert. See POSTing an entity type with children to an (MVC Web Api) OData service for more details on using deep insert with Web API OData
Upvotes: 2