Insert a Sub-Object

If there is already relation parent object in NObject O/R Mapping persistence layer you can also add a sub-object in the following way:

Customer customer = ...;

// ...

Order order = customer.NewOrder();

order.OrderDate = DateTime.Now;

order.ShipCity = "Macrobject City";

order.Save();

Related Topics

Insert a New Object