iBATIS.NET - Data Access Objects Application Framework

Data Access Objects Developer Guide

Gilles Bayon

Clinton Begin

Roberto Rabe

Version 1.9.1

Legal Notice

March 2007


1. Introduction
1.1. Overview
1.2. License Information
1.3. Support
1.4. Disclaimer
2. Data Access Objects
2.1. Data Access Objects
2.2. The Components of the Data Access Objects API
2.3. Session Handler
3. Configuration
3.1. Installation
3.1.1. Setup the Distribution
3.1.2. Add Assembly References
3.1.3. Setup XML configuration documents
3.1.4. Visual Studio.NET Integration
3.2. Logging Activity
3.2.1. Sample Logging Configurations
3.3. The Configuration File (dao.config)
3.4. Configuration Elements
3.4.1. type Attributes
3.4.2. The <providers> Element
3.4.2.1. <providers> attributes
3.4.3. The <context> Element
3.4.3.1. The <properties> Element
3.4.3.1.1. <property> element and attributes
3.4.3.2. The <database> Element
3.4.3.2.1. The <provider> Element
3.4.3.2.2. The <dataSource> Element
3.4.3.3. The <daoSessionHandler> Element
3.4.3.3.1. The <property> Element
3.4.3.4. The <daoFactory> Element
3.4.3.4.1. The <dao> Element
4. Session Handler Implementations and Configuration
4.1. Overview
4.2. Simple DAO Session Handler (Default) Example Configuration
4.3. SqlMap DAO Session Handler Example Configuration
4.4. NHibernate DAO Session Handler Example Configuration
5. DAO Programming
5.1. Overview
5.2. Configuration with the DomDaoManagerBuilder
5.3. Contexts, the DaoManager, and Session Handlers
5.4. Getting a Data Access Object
5.5. Working with Connection and Transactions
5.6. "AutoConnection"-Behavior
5.7. Distributed transactions
6. Implementing the DAO Interface (Creating Your Data Access Objects)
6.1. Interface
6.2. DAO Design Considerations
6.3. An Example BaseDao
6.4. Consistency and Hidden Implementations
6.4.1. ADO.NET AccountDao with the Simple DAO Session Handler
6.4.2. Data Mapper AccountDao with the SqlMap DAO Session Handler
6.4.3. Using the AccountDao with the DaoManager
6.4.4. NHibernate DAO with the NHibernate DAO Session Handler
7. Examples
7.1. NPetshop Application
A. iBATIS.NET's DaoConfig.xsd