Ejemplo n.º 1
0
 /// <summary>
 /// Gets the ISessionFactory
 /// </summary>
 /// <remarks>an overload of <see cref="GetSessionFactory(Type)"/> that can be used when you have one entityType mapped in multiple persistenceUnits</remarks>
 public ISessionFactory GetSessionFactory(string persistenceUnitName)
 {
     return(PersistenceUnitRepo.GetPU(persistenceUnitName).SessionFactory);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Gets the ISessionFactory
 /// </summary>
 /// <param name="entityType">the entity type whose mapping is included in the SessionFactory,
 /// when there are multiple databases, Burrow use this to locate the right one</param>
 /// <returns>the sessionFactory</returns>
 /// <remarks>
 /// For getting a Session please use <see cref="GetSession()"/> as it's managed by Burrow.
 /// If you use OpenSession() of this SessionFactory,
 /// the session you get won't be managed by Burrow
 /// and you will be responsible for managing the status of that session yourself
 /// </remarks>
 public ISessionFactory GetSessionFactory(System.Type entityType)
 {
     return(PersistenceUnitRepo.GetPU(entityType).SessionFactory);
 }