using Telerik.OpenAccess;

namespace _1_ForwardMapping
{
  class Program
  {
    static void Main(string[] args)
    {
      IObjectScope scope = ObjectScopeProvider1.ObjectScope();
      scope.Transaction.Begin();

      Customer customer = new Customer();
      customer.CustomerName = "Bob";
      customer.CustomerNumber = 123;

      Order order = new Order();
      order.OrderNumber = 1;
      customer.Orders.Add(order);

      scope.Add(customer);
      scope.Transaction.Commit();
    }
  }
}
