A data access layer (DAL for short) is a bridge between an object access layer, which generates general type statements, and a data store provider (an IDataStore implementation), which provides a connection to individual data stores (MS SQL Server, MS Access databases, etc.) A DAL (an IDataLayer implementation) provides a set of methods allowing for unified access to data stores (obtaining data from a data store, updating its data and schema) via object access layers.
Though a DAL is a part of XPO's internal infrastructure, there are specific instances when you can create data access layers manually and use them explicitly in your applications. The most common is to connect to a data store using a DAL and share it across multiple sessions to improve an application's performance.
By default, each session object creates a new DAL when a connection to a data store is about to be established. You can, however, force a session to use an existing DAL. In this case, specific initialization steps are omitted and so the connection is established faster.
To make a session use a specific DAL do one of the following.
Assign the DAL to the XpoDefault.DataLayer property. All newly created sessions whose DALs are not initialized will use this DAL by default.