sessionFactory already exist
- by senzacionale
Can someone advice me how to prevent this error. SessionFactory already exist?
sessionFactory = cfg.BuildSessionFactory();
if (sessionFactory == null)
{
throw new InvalidOperationException("cfg.BuildSessionFactory() returned null.");
}
if (sessionFactoryConfigPath != null)
sessionFactories.Add(sessionFactoryConfigPath, sessionFactory);