views:

281

answers:

1

Is there a way to setup SQLite connection pooling using Fluent NHibernate configuration?

E.g. equivalent of DataSource=:memory: would be:

var sessionFactory = Fluently
     .Configure()
     .Database(SQLiteConfiguration.Standard.InMemory)
     (etc.)

Is there something eqivalent to "Pooling=True;Max Pool Size=1;"?

+1  A: 

You still need to specify a connection string when using Fluent NHibernate (or NHibernate without fluent for that matter) in the NHibernate configuration so you can just enable connection pooling in the connection string as you would if you were using ADO.NET.

s1mm0t
Thanks, it's just that for SQLite you only need to specify a file name to get it running (`SQLiteConfiguration.Standard.UsingFile(SQLiteDbFileName)`), or (`.InMemory'`) to get a in-memory db. So I thought that they might have added all sorts of fluent methods for configuring all that other stuff also. Never mind, it's just for testing anyway.
Groo
`UsingFile` is just a shortcut for `ConnectionString(string)` with a pre-build connection string. You should just be able to call `ConnectionString` with whatever you want as the argument.
James Gregory