コード例 #1
0
        /// <summary>
        /// Open a <c>ISession</c> on the given connection
        /// </summary>
        /// <param name="connection">The connection.</param>
        /// <param name="autoClose">if set to <c>true</c> [auto close].</param>
        /// <returns>A session</returns>
        /// <remarks>
        /// The <c>ISession</c> is save in the <see cref="ISessionStore"/>
        /// </remarks>
        public ISession OpenSession(IDbConnection connection, bool autoClose)
        {
            ISession session = new DataMapperSession(connection, this, transactionManager, autoClose);

            sessionStore.Store(session);
            return(session);
        }
コード例 #2
0
        /// <summary>
        /// Open a <c>ISession</c> on the given connection
        /// </summary>
        /// <param name="connection">The connection.</param>
        /// <param name="autoClose">if set to <c>true</c> [auto close].</param>
        /// <returns>A session</returns>
        /// <remarks>
        /// The <c>ISession</c> is save in the <see cref="ISessionStore"/>
        /// </remarks>
        public ISession OpenSession(IDbConnection connection, bool autoClose)
        {
            ISession session = new DataMapperSession(connection, this, transactionManager, autoClose);

            sessionStore.Store(session);
            return session;
        }