If you remember, back in Chapter 5, The Session Procession when we talked about NHibernate sessions, we inserted some basic code to get us up and running that looked as follows:
Configuration cfg = new Configuration(); cfg.Properties.Add(NHibernate.Cfg.Environment.ConnectionProvider, typeof(NHibernate.Connection.DriverConnectionProvider).AssemblyQualifiedName); cfg.Properties.Add(NHibernate.Cfg.Environment.Dialect, typeof(NHibernate.Dialect.MsSql2008Dialect).AssemblyQualifiedName); cfg.Properties.Add(NHibernate.Cfg.Environment.ConnectionDriver, typeof(NHibernate.Driver.SqlClientDriver).AssemblyQualifiedName); cfg.Properties.Add(NHibernate.Cfg.Environment.ConnectionString, "Server= (local)\\SQLExpress;Database=ordering;Trusted_Connection=true;"); cfg.Properties.Add(NHibernate.Cfg.Environment.ProxyFactoryFactoryClass,typeof(NHibernate.ByteCode.LinFu.ProxyFactoryFactory).AssemblyQualifiedName); cfg.AddAssembly(typeof(Ordering.Data.Address).Assembly);