July 2015
Intermediate to advanced
1300 pages
87h 27m
English
In the current example, the Customer and Order entities have a one-to-many relationship in which one customer can have many orders. In OData terminology, relationships are referred to as references. References are automatically managed by the .NET Framework, except when you create a new object and you must add a relationship, or when you update a relationship on an existing object. These situations are respectively represented by POST and PUT verbs. Suppose you want to handle situations in which you add new orders or update existing orders. In the OrdersController class, you need to add the following method (pay attention to the comments):
<AcceptVerbs("POST", "PUT")>Public ...