views:

170

answers:

2

I know NHibernate has a driver for SQLite, but what do I have to install locally to use the in-memory version?

+1  A: 

No you don't have to install anything when you want to run in-memory. Just reference the dll (copy-local true)

The name of the dll is System.Data.SQLite.dll You can download it at source forge

I started using sqllite in-memory when I was browsing through the FluentNhibernate examples. So I copied it from FluentNhibernate. I use the following configuration:

FluentConfiguration configuration = Fluently.Configure()
  .Database(() =>
    SQLiteConfiguration.Standard
     .InMemory()
     .ProxyFactoryFactory("NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle")
     .Mappings(mappingConfiguration => mappingConfiguration
     .FluentMappings
     .AddFromAssemblyOf<User>()); 
SessionSource sessionSource = new SingleConnectionSessionSourceForSQLiteInMemoryTesting(configuration);
ISession session = sessionSource.CreateSession()
Paco
where do I get the .dll from? what is the name?
mrblah