IBATIS.NET Developer Guide

Docs

3.4 Parameter Maps and Inline Parameters

3.5 Result Maps

3.6 Supported Types for Parameter Maps and Result Maps

3.7 Supported database types for Parameter Maps and Result Maps

3.8 Cache Models

3.9 Dynamic SQL

4.3. Configuring the DataMapper for .NET

4.4. Programming with iBATIS DataMapper: The .NET API

  4.4.3 Session

4.4.4 Connection

4.4.5. Automatic Session

4.4.6. Transaction

4.4.7. Distributed Transactions

 

 

 

缓存机制 loading...

 

 

 

 

?????????????????????

The DatatMapper component store his working ISqlMapSession on different session store.

 

On Web environnement, the session is stored Http.Request.Items.

 

 

 

On windows environnement on the current thread.

 

 

 

You can configure the session storage by specifing the property ISessionStore on ISqlMapper.

 

This will allow to set a custom session store like the HybridWebThreadSessionStore This is used for scenarios where most of the you need per request session, but you also does some work outside a request (in a thread pool thread, for instance).

 

Set it after the configuration and before use of the ISqlMapper.

 

Example 4.12. Custom ISessionStore

sqlMapper.SessionStore = new HybridWebThreadSessionStore( sqlMapper.Id );
...
sqlMapper.QueryOject(...)

 

posted @ 2020-03-23 18:24  vvf  阅读(96)  评论(0编辑  收藏  举报