sessionFactory already exist

Posted by senzacionale on Stack Overflow See other posts from Stack Overflow or by senzacionale
Published on 2010-03-13T10:19:56Z Indexed on 2010/03/13 10:25 UTC
Read the original article Hit count: 196

Filed under:

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);

© Stack Overflow or respective owner

Related posts about c#