using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Castle.ActiveRecord;
using Castle.ActiveRecord.Framework;
using Castle.ActiveRecord.Framework.Config;
using System.Reflection;

namespace CompositeKeyExample
{
    class Program
    {
        static void Main( string[] args )
        {
            IConfigurationSource source = ActiveRecordSectionHandler.Instance;
            ActiveRecordStarter.Initialize( Assembly.GetAssembly( typeof( Program ) ), source );
            ActiveRecordStarter.DropSchema();
            ActiveRecordStarter.CreateSchema();

            Osoba o = new Osoba
            {
                ID = new UserKey() { OrgID = 1, UserID = 1 },
                Imie = "Jan",
                Nazwisko = "Kowalski"
            };
            o.Create();

        }
    }
}
