예제 #1
0
        /// <summary>
        /// Builds a new <see cref="RequestScope"/> and the <see cref="IDbCommand"/> text to execute.
        /// </summary>
        /// <param name="parameterObject">The parameter object (used in DynamicSql)</param>
        /// <param name="session">The current session</param>
        /// <param name="mappedStatement">The <see cref="IMappedStatement"/>.</param>
        /// <returns>A new <see cref="RequestScope"/>.</returns>
        public RequestScope GetRequestScope(IMappedStatement mappedStatement, 
            object parameterObject, ISqlMapSession session)
        {
            RequestScope request = new RequestScope( _dataExchangeFactory, session, _statement);

            _paramParser = new InlineParameterMapParser();

            string sqlStatement = Process(request, parameterObject);
            request.PreparedStatement = BuildPreparedStatement(session, request, sqlStatement);
            request.MappedStatement = mappedStatement;

            return request;
        }
예제 #2
0
 /// <summary>
 /// Constructs a DomSqlMapBuilder.
 /// </summary>
 public DomSqlMapBuilder()
 {
     _configScope = new ConfigurationScope();
     _paramParser = new InlineParameterMapParser();
     _deSerializerFactory = new DeSerializerFactory(_configScope);
 }