Skip to content

Instantly share code, notes, and snippets.

@cbilson
Created March 16, 2009 18:39
Show Gist options
  • Save cbilson/79996 to your computer and use it in GitHub Desktop.
Save cbilson/79996 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Castle.Windsor;
using Castle.Core.Resource;
using Castle.MonoRail.WindsorExtension;
using Ris.Fx.Web.Controllers;
using Castle.MicroKernel.Registration;
using Castle.MonoRail.Framework;
using Ris.Common.ContainerExtensions;
using FluentNHibernate;
using FluentNHibernate.Cfg;
using Ris.Common.Configuration;
using NHibernate.Dialect;
namespace Ris.Fx.Web {
public class FxPersistenceSettings : MsSqlConfiguration {
IEnvironmentService _env;
public FxPersistenceSettings(IEnvironmentService env) {
_env = env;
Dialect<MsSql2000Dialect>();
ConnectionString.Is(env.GetConnectionString("fx"));
Raw("proxyfactory.factory_class", "NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle");
DefaultSchema("dbo");
ShowSql();
UseReflectionOptimizer();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment