private static void ConfigureDatabase() { ActiveRecordStarter.Initialize( InPlaceConfigurationSource.BuildForMSSqlServer("localhost", "test"), typeof(Customer), typeof(CustomerOperation), typeof(Operation)); ActiveRecordStarter.CreateSchema(); Customer customer = new Customer(); customer.Name = "oren"; ActiveRecordMediator.Save(customer); Operation op = new Operation(); op.Name = "View"; ActiveRecordMediator.Save(op); CustomerOperation co = new CustomerOperation(); co.Customer = customer; co.Operation = op; ActiveRecordMediator.Save(co); }
private static void ConfigureDatabase() { ActiveRecordStarter.Initialize( InPlaceConfigurationSource.BuildForMSSqlServer("localhost", "test"), typeof(Customer), typeof(CustomerOperation), typeof(Operation)); ActiveRecordStarter.CreateSchema(); Customer customer = new Customer(); customer.Name = "oren"; ActiveRecordMediator.Save(customer); Operation op = new Operation(); op.Name = "View"; ActiveRecordMediator.Save(op); CustomerOperation co = new CustomerOperation(); co.Customer = customer; co.Operation = op; ActiveRecordMediator.Save(co); }