public NHibernate.ISessionFactory AddSessionFactory(string sessionFactoryIdentifire, string dbmsTypeAsString, string connectionStringName, List <Type> listOfEntityMapTypes, bool withLog = true)
        {
            var sessionFactory = SessionFactoryBuilder.BuildSessionFactory(dbmsTypeAsString, connectionStringName, listOfEntityMapTypes, withLog);

            _sessionFactoryDictionary.Add(sessionFactoryIdentifire, sessionFactory);
            return(sessionFactory);
        }
        public NHibernate.ISessionFactory AddSessionFactoryForNamespaceOf <E, M>(string dbmsTypeAsString, string connectionStringName, bool withLog = true, bool create = false, bool update = false)
            where E : DomainLayer.Base.Classes.BasicEntity
            where M : class
        {
            var entityNamespace = typeof(E).Namespace;
            var listOfEntityMap = typeof(M).Assembly.GetTypes().Where(t => String.Equals(t.Namespace, typeof(M).Namespace)).ToList();
            var sessionFactory  = SessionFactoryBuilder.BuildSessionFactory(dbmsTypeAsString, connectionStringName, listOfEntityMap, withLog, create, update);

            _sessionFactoryDictionary.Add(entityNamespace, sessionFactory);
            return(sessionFactory);
        }