Esempio n. 1
0
        public IDbConnectionSession BeginSession(RequestContext context)
        {
            if (SessionStore.LocalSession != null)
            {
                throw new SmartSqlException("SmartSqlMapper could not invoke BeginSession(). A LocalSession is already existed.");
            }
            var dataSource = DataSourceFilter.Elect(context);
            var dbSession  = SessionStore.CreateDbSession(dataSource);

            dbSession.Begin();
            return(dbSession);
        }