using Telerik.OpenAccess;

namespace _1_ORM_Forward_Mapping
{
    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();
        }
    }
}
