-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
81 changed files
with
2,123 additions
and
1,820 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> | ||
<meta http-equiv="X-UA-Compatible" content="IE=9"/> | ||
<meta name="generator" content="Doxygen 1.9.1"/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"/> | ||
<title>Enterprise Library Data Access Application Block: Data Access Application Block User Guide</title> | ||
<link href="tabs.css" rel="stylesheet" type="text/css"/> | ||
<script type="text/javascript" src="jquery.js"></script> | ||
<script type="text/javascript" src="dynsections.js"></script> | ||
<link href="navtree.css" rel="stylesheet" type="text/css"/> | ||
<script type="text/javascript" src="resize.js"></script> | ||
<script type="text/javascript" src="navtreedata.js"></script> | ||
<script type="text/javascript" src="navtree.js"></script> | ||
<link href="search/search.css" rel="stylesheet" type="text/css"/> | ||
<script type="text/javascript" src="search/searchdata.js"></script> | ||
<script type="text/javascript" src="search/search.js"></script> | ||
<link href="doxygen.css" rel="stylesheet" type="text/css" /> | ||
</head> | ||
<body> | ||
<div id="top"><!-- do not remove this div, it is closed by doxygen! --> | ||
<div id="titlearea"> | ||
<table cellspacing="0" cellpadding="0"> | ||
<tbody> | ||
<tr style="height: 56px;"> | ||
<td id="projectlogo"><img alt="Logo" src="entlib_new_icon_100x100.png"/></td> | ||
<td id="projectalign" style="padding-left: 0.5em;"> | ||
<div id="projectname">Enterprise Library Data Access Application Block | ||
 <span id="projectnumber">7.0-rc1</span> | ||
</div> | ||
<div id="projectbrief">The Data Access Application Block abstracts the actual database you are using, and exposes a collection of methods that make it easy to access that database and to perform common tasks.</div> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<!-- end header part --> | ||
<!-- Generated by Doxygen 1.9.1 --> | ||
<script type="text/javascript"> | ||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ | ||
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html'); | ||
/* @license-end */ | ||
</script> | ||
<script type="text/javascript" src="menudata.js"></script> | ||
<script type="text/javascript" src="menu.js"></script> | ||
<script type="text/javascript"> | ||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ | ||
$(function() { | ||
initMenu('',true,false,'search.php','Search'); | ||
$(document).ready(function() { init_search(); }); | ||
}); | ||
/* @license-end */</script> | ||
<div id="main-nav"></div> | ||
</div><!-- top --> | ||
<div id="side-nav" class="ui-resizable side-nav-resizable"> | ||
<div id="nav-tree"> | ||
<div id="nav-tree-contents"> | ||
<div id="nav-sync" class="sync"></div> | ||
</div> | ||
</div> | ||
<div id="splitbar" style="-moz-user-select:none;" | ||
class="ui-resizable-handle"> | ||
</div> | ||
</div> | ||
<script type="text/javascript"> | ||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ | ||
$(document).ready(function(){initNavTree('a00940.html',''); initResizable(); }); | ||
/* @license-end */ | ||
</script> | ||
<div id="doc-content"> | ||
<!-- window showing the filter options --> | ||
<div id="MSearchSelectWindow" | ||
onmouseover="return searchBox.OnSearchSelectShow()" | ||
onmouseout="return searchBox.OnSearchSelectHide()" | ||
onkeydown="return searchBox.OnSearchSelectKey(event)"> | ||
</div> | ||
|
||
<!-- iframe showing the search results (closed by default) --> | ||
<div id="MSearchResultsWindow"> | ||
<iframe src="javascript:void(0)" frameborder="0" | ||
name="MSearchResults" id="MSearchResults"> | ||
</iframe> | ||
</div> | ||
|
||
<div class="PageDoc"><div class="header"> | ||
<div class="headertitle"> | ||
<div class="title">Data Access Application Block User Guide </div> </div> | ||
</div><!--header--> | ||
<div class="contents"> | ||
<div class="toc"><h3>Table of Contents</h3> | ||
<ul><ul><li class="level2"><a href="#autotoc_md1">What is the Data Access Application Block</a></li> | ||
<li class="level2"><a href="#autotoc_md2">NuGet Packages</a></li> | ||
<li class="level2"><a href="#autotoc_md3">Configuration</a><ul><li class="level3"><a href="#autotoc_md4">Oracle Configuration</a></li> | ||
</ul> | ||
</li> | ||
<li class="level2"><a href="#autotoc_md5">Code Examples</a></li> | ||
</ul> | ||
</ul> | ||
</div> | ||
<div class="textblock"><p>This guide shows how to use the Enterprise Library Data Access Application Block (DAAB for short) version 7.0. For a guide to version 6.0, see the <a href="https://docs.microsoft.com/en-us/previous-versions/msp-n-p/dn440726(v=pandp.60)">original documentation by Microsoft</a>.</p> | ||
<h2><a class="anchor" id="autotoc_md1"></a> | ||
What is the Data Access Application Block</h2> | ||
<p>The Data Access Application Block abstracts the actual database you are using, and exposes a collection of methods that make it easy to access that database and to perform common tasks. The block is designed to simplify the task of calling stored procedures, but it also provides full support for the use of parameterized SQL statements.</p> | ||
<p>In other words, the Data Access Application Block provides access to the most often used features of ADO.NET in simple-to-use classes and provides a corresponding boost to developer productivity.</p> | ||
<p>In addition to the more common approaches familiar to users of ADO.NET, the Data Access block also exposes techniques for asynchronous data access for databases that support this feature using the Asynchronous Programming Model (TPL coming in the near future), and provides the ability to return data as a sequence of objects suitable for client-side querying using techniques such as Language Integrated Query (LINQ).</p> | ||
<p>However, the block is not intended to be an Object/Relational Mapping (O/RM) solution. Although it uses mappings to relate parameters and relational data with the properties of objects, but does not implement an O/RM modeling solution.</p> | ||
<h2><a class="anchor" id="autotoc_md2"></a> | ||
NuGet Packages</h2> | ||
<p>DAAB is composed of a base package, called <a href="https://www.nuget.org/packages/EnterpriseLibrary.Data.NetCore/">EnterpriseLibrary.Data.NetCore</a>, and several other packages which support specific database engines. For databases which are not directly supported by DAAB, only the base package is needed. The database-specific packages support unique features of those systems.</p> | ||
<table class="markdownTable"> | ||
<tr class="markdownTableHead"> | ||
<th class="markdownTableHeadNone">Supported Database </th><th class="markdownTableHeadNone">Package </th><th class="markdownTableHeadNone">.NET Framework support </th></tr> | ||
<tr class="markdownTableRowOdd"> | ||
<td class="markdownTableBodyNone">Generic </td><td class="markdownTableBodyNone">EnterpriseLibrary.Data.NetCore </td><td class="markdownTableBodyNone">.NET 4.5.2, 4.6, 4.7; .NET Core 2.1, 3.1; .NET Standard 2.0 </td></tr> | ||
<tr class="markdownTableRowEven"> | ||
<td class="markdownTableBodyNone">OLE DB </td><td class="markdownTableBodyNone">EnterpriseLibrary.Data.OleDb.NetCore </td><td class="markdownTableBodyNone">.NET 4.5.2, 4.6, 4.7; .NET Core 2.1, 3.1; .NET Standard 2.0 </td></tr> | ||
<tr class="markdownTableRowOdd"> | ||
<td class="markdownTableBodyNone">SQL Server </td><td class="markdownTableBodyNone">EnterpriseLibrary.Data.SqlServer.NetCore </td><td class="markdownTableBodyNone">.NET 4.5.2, 4.6, 4.7; .NET Core 2.1, 3.1; .NET Standard 2.0 </td></tr> | ||
<tr class="markdownTableRowEven"> | ||
<td class="markdownTableBodyNone">Oracle </td><td class="markdownTableBodyNone">EnterpriseLibrary.Data.Oracle.NetCore </td><td class="markdownTableBodyNone">.NET 4.5.2, 4.6, 4.7; .NET Core 2.1, 3.1; .NET Standard 2.0 </td></tr> | ||
<tr class="markdownTableRowOdd"> | ||
<td class="markdownTableBodyNone">ODBC </td><td class="markdownTableBodyNone">EnterpriseLibrary.Data.Odbc.NetCore </td><td class="markdownTableBodyNone">.NET 4.5.2, 4.6, 4.7; .NET Core 2.1, 3.1; .NET Standard 2.0 </td></tr> | ||
<tr class="markdownTableRowEven"> | ||
<td class="markdownTableBodyNone">SQL Server CE </td><td class="markdownTableBodyNone">EnterpriseLibrary.Data.SqlCe.NetCore </td><td class="markdownTableBodyNone">.NET 4.5.2, 4.6, 4.7 </td></tr> | ||
</table> | ||
<h2><a class="anchor" id="autotoc_md3"></a> | ||
Configuration</h2> | ||
<p>After installing the appropriate package(S), you should add the following configuration elements to your app.config or web.config file.</p><ol type="1"> | ||
<li>Under the <code><configSections></code> element, add the following section: <div class="fragment"><div class="line"><<span class="keywordtype">section</span> <span class="keyword">name</span>=<span class="stringliteral">"dataConfiguration"</span> <span class="keyword">type</span>=<span class="stringliteral">"Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data"</span> /></div> | ||
</div><!-- fragment --></li> | ||
<li>Under the <code><connectionStrings></code> section, add a normal connection string to your database, with a <code>name</code>, <code>connectionString</code> and <code>providerName</code> attributes. DAAB supports the following provider names:<ol type="a"> | ||
<li><code>System.Data.SqlClient</code></li> | ||
<li><code>Oracle.ManagedDataAccess.Client</code></li> | ||
<li><code>System.Data.OleDb</code></li> | ||
<li><code>System.Data.Odbc</code></li> | ||
<li><code>System.Data.SqlServerCe.4.0</code></li> | ||
</ol> | ||
</li> | ||
<li>Under the root <code><configuration></code> element, but somewhere bellow the <code><configSections></code>, add the following section: <div class="fragment"><div class="line"><<span class="keywordtype">dataConfiguration</span> <span class="keyword">defaultDatabase</span>=<span class="stringliteral">"MyConnectionString"</span>></div> | ||
<div class="line"></<span class="keywordtype">dataConfiguration</span>></div> | ||
</div><!-- fragment --> The <code>defaultDatabase</code> attribute points to the <code>name</code> of the connection string above. In code, you can direct DAAB to use a different connection string.</li> | ||
<li>Under the <code><dataConfiguration></code> add the following section: <div class="fragment"><div class="line"><<span class="keywordtype">providerMappings</span>></div> | ||
<div class="line"> <<span class="keywordtype">add</span> <span class="keyword">databaseType</span>=<span class="stringliteral">""</span> <span class="keyword">name</span>=<span class="stringliteral">""</span> /></div> | ||
<div class="line"></<span class="keywordtype">providerMappings</span>></div> | ||
</div><!-- fragment --><ol type="a"> | ||
<li><code>name</code> is a provider name, as listed above in section 2.</li> | ||
<li><code>databaseType</code> is one of the following types:</li> | ||
</ol> | ||
</li> | ||
</ol> | ||
<table class="markdownTable"> | ||
<tr class="markdownTableHead"> | ||
<th class="markdownTableHeadNone">Database </th><th class="markdownTableHeadNone">databaseType </th></tr> | ||
<tr class="markdownTableRowOdd"> | ||
<td class="markdownTableBodyNone">Generic </td><td class="markdownTableBodyNone">"Microsoft.Practices.EnterpriseLibrary.Data.GenericDatabase, Microsoft.Practices.EnterpriseLibrary.Data" </td></tr> | ||
<tr class="markdownTableRowEven"> | ||
<td class="markdownTableBodyNone">SQL Server CE </td><td class="markdownTableBodyNone">"Microsoft.Practices.EnterpriseLibrary.Data.SqlCe.SqlCeDatabase, Microsoft.Practices.EnterpriseLibrary.Data.SqlCe" </td></tr> | ||
<tr class="markdownTableRowOdd"> | ||
<td class="markdownTableBodyNone">Oracle </td><td class="markdownTableBodyNone">"Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDatabase, Microsoft.Practices.EnterpriseLibrary.Data.Oracle" </td></tr> | ||
<tr class="markdownTableRowEven"> | ||
<td class="markdownTableBodyNone">SQL Server </td><td class="markdownTableBodyNone">"Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase, Microsoft.Practices.EnterpriseLibrary.Data.SqlServer" </td></tr> | ||
<tr class="markdownTableRowOdd"> | ||
<td class="markdownTableBodyNone">OLE DB </td><td class="markdownTableBodyNone">"Microsoft.Practices.EnterpriseLibrary.Data.OleDb.OleDbDatabase, Microsoft.Practices.EnterpriseLibrary.Data.OleDb" </td></tr> | ||
<tr class="markdownTableRowEven"> | ||
<td class="markdownTableBodyNone">ODBC </td><td class="markdownTableBodyNone">"Microsoft.Practices.EnterpriseLibrary.Data.Odbc.OdbcDatabase, Microsoft.Practices.EnterpriseLibrary.Data.Odbc" </td></tr> | ||
</table> | ||
<h3><a class="anchor" id="autotoc_md4"></a> | ||
Oracle Configuration</h3> | ||
<h2><a class="anchor" id="autotoc_md5"></a> | ||
Code Examples</h2> | ||
</div></div><!-- contents --> | ||
</div><!-- PageDoc --> | ||
</div><!-- doc-content --> | ||
<!-- start footer part --> | ||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> | ||
<ul> | ||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li> | ||
</ul> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.