Sure, it's a simple method:
IRepository<Person> GetPersonRepository()
{
return new NHRepository<Person>(_session);
}
The "_session" object is initialized in my Setup method (using NUnit)
and is set to the return value of CreateSession().
public ISession CreateSession()
{
var openSession = _factory.OpenSession();
(new SchemaExport(_configuration))
.Execute(true, true, false, openSession.Connection,
new StringWriter(new StringBuilder()));
return openSession;
}
I am using the same session throughout a test run due to the dynamics
of SQLite and the fact that the database will be "deleted" otherwise.
> > Any ideas? Thank for any advice.- Hide quoted text -
>
> - Show quoted text -