Skip to content

Commit

Permalink
replace DAAB main page content
Browse files Browse the repository at this point in the history
  • Loading branch information
tsahi committed Sep 17, 2021
1 parent c548cfd commit c8bb1b4
Show file tree
Hide file tree
Showing 81 changed files with 2,123 additions and 1,820 deletions.
182 changes: 182 additions & 0 deletions daab/a00940.html
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
&#160;<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&amp;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&amp;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&amp;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>&lt;configSections&gt;</code> element, add the following section: <div class="fragment"><div class="line">&lt;<span class="keywordtype">section</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;dataConfiguration&quot;</span> <span class="keyword">type</span>=<span class="stringliteral">&quot;Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data&quot;</span> /&gt;</div>
</div><!-- fragment --></li>
<li>Under the <code>&lt;connectionStrings&gt;</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>&lt;configuration&gt;</code> element, but somewhere bellow the <code>&lt;configSections&gt;</code>, add the following section: <div class="fragment"><div class="line">&lt;<span class="keywordtype">dataConfiguration</span> <span class="keyword">defaultDatabase</span>=<span class="stringliteral">&quot;MyConnectionString&quot;</span>&gt;</div>
<div class="line">&lt;/<span class="keywordtype">dataConfiguration</span>&gt;</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>&lt;dataConfiguration&gt;</code> add the following section: <div class="fragment"><div class="line">&lt;<span class="keywordtype">providerMappings</span>&gt;</div>
<div class="line"> &lt;<span class="keywordtype">add</span> <span class="keyword">databaseType</span>=<span class="stringliteral">&quot;&quot;</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;&quot;</span> /&gt;</div>
<div class="line">&lt;/<span class="keywordtype">providerMappings</span>&gt;</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>
6 changes: 6 additions & 0 deletions daab/annotated_dup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
var annotated_dup =
[
[ "What is the Data Access Application Block", "a00940.html#autotoc_md1", null ],
[ "NuGet Packages", "a00940.html#autotoc_md2", null ],
[ "Configuration", "a00940.html#autotoc_md3", [
[ "Oracle Configuration", "a00940.html#autotoc_md4", null ]
] ],
[ "Code Examples", "a00940.html#autotoc_md5", null ],
[ "Microsoft", "a00233.html", [
[ "Practices", "a00234.html", [
[ "EnterpriseLibrary", "a00235.html", [
Expand Down
40 changes: 1 addition & 39 deletions daab/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,49 +83,11 @@
</iframe>
</div>

<div class="PageDoc"><div class="header">
<div class="header">
<div class="headertitle">
<div class="title">Enterprise Library Data Access Application Block Documentation</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p><a class="anchor" id="md_C__Users_Tsahi_Asher_source_repos_EnterpriseLibrary_data_access_application_block_README"></a> <a href="https://ci.appveyor.com/project/EnterpriseLibrary/data-access-application-block/branch/master"><img src="https://ci.appveyor.com/api/projects/status/2yn8u67mpbnjfyvt/branch/master?svg=true" alt="Build status" class="inline"/></a> <a href="https://www.nuget.org/packages/EnterpriseLibrary.Data.NetCore"><img src="https://img.shields.io/nuget/vpre/EnterpriseLibrary.Data.NetCore.svg" alt="NuGet Pre Release" style="pointer-events: none;" class="inline"/></a> <a href="https://www.nuget.org/packages/EnterpriseLibrary.Data.NetCore"><img src="https://img.shields.io/nuget/dt/EnterpriseLibrary.Data.NetCore.svg" alt="NuGet Downloads" style="pointer-events: none;" class="inline"/></a> <a href="https://github.com/EnterpriseLibrary/data-access-application-block/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-apache%202.0-60C060.svg" alt="License" style="pointer-events: none;" class="inline"/></a></p>
<h1><a class="anchor" id="autotoc_md0"></a>
DATA ACCESS APPLICATION BLOCK (DAAB)</h1>
<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>For example, suppose you wanted to query your database using the <code>SalesByCategory</code> procedure, and retrieve the results as a DataTable, keeping your code database-agnostic. In standard ADO.NET, the following code was required:</p>
<div class="fragment"><div class="line">ConnectionStringSettings connectionString = ConfigurationManager.ConnectionStrings[&quot;MyConnection&quot;];</div>
<div class="line">String providerName = connectionString.ProviderName;</div>
<div class="line">DbProviderFactory factory = DbProviderFactories.GetFactory(providerName);</div>
<div class="line">using (DbConnection connection = factory.CreateConnection())</div>
<div class="line">{</div>
<div class="line"> connection.ConnectionString = connectionString.ConnectionString;</div>
<div class="line"> DbCommand command = connection.CreateCommand();</div>
<div class="line"> command.CommandText = &quot;SalesByCategory&quot;;</div>
<div class="line"> command.CommandType = CommandType.StoredProcedure;</div>
<div class="line"> DbParameter parameter = command.CreateParameter();</div>
<div class="line"> parameter.Value = &quot;Beverages&quot;;</div>
<div class="line"> parameter.DbType = DbType.String;</div>
<div class="line"> parameter.Direction = ParameterDirection.Input;</div>
<div class="line"> parameter.ParameterName = &quot;@CategoryName&quot;;</div>
<div class="line"> command.Parameters.Add(parameter);</div>
<div class="line"> DbDataAdapter adapter = factory.CreateDataAdapter();</div>
<div class="line"> adapter.SelectCommand = command;</div>
<div class="line"> DataTable dt = new DataTable();</div>
<div class="line"> connection.Open();</div>
<div class="line"> adapter.Fill(dt);</div>
<div class="line">}</div>
</div><!-- fragment --><p> Using the Data Access Application Block, this code becomes: </p><div class="fragment"><div class="line">DatabaseProviderFactory factory = new DatabaseProviderFactory();</div>
<div class="line">Database database = factory.Create(&quot;MyConnection&quot;);</div>
<div class="line">DbCommand command = database.GetStoredProcCommand(&quot;SalesByCategory&quot;, &quot;Beverages&quot;);</div>
<div class="line">DataSet ds = database.ExecuteDataSet(command);</div>
<div class="line">DataTable dt = ds.Tables[0];</div>
</div><!-- fragment --><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_md1"></a>
How to help</h2>
<p>Interested in helping out? That's great. Look at the <a href="https://github.com/EnterpriseLibrary/data-access-application-block/issues">issues</a> and see if there's something you'd like to work on, or <a href="https://github.com/EnterpriseLibrary/data-access-application-block/issues/new/choose">open a new issue</a> if you have a new idea. Once your new issue is approved, head to the <a href="https://github.com/EnterpriseLibrary/data-access-application-block/wiki">wiki</a> to learn about our coding conventions and how to set up your environment, fork and submit a PR. </p>
</div></div><!-- PageDoc -->
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
Expand Down
1 change: 1 addition & 0 deletions daab/menudata.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*/
var menudata={children:[
{text:"Main Page",url:"index.html"},
{text:"Related Pages",url:"pages.html"},
{text:"Classes",url:"annotated.html",children:[
{text:"Class List",url:"annotated.html"},
{text:"Class Index",url:"classes.html"},
Expand Down
6 changes: 2 additions & 4 deletions daab/navtreedata.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
var NAVTREE =
[
[ "Enterprise Library Data Access Application Block", "index.html", [
[ "DATA ACCESS APPLICATION BLOCK (DAAB)", "index.html#autotoc_md0", [
[ "How to help", "index.html#autotoc_md1", null ]
] ],
[ "Data Access Application Block User Guide", "a00940.html", null ],
[ "Classes", "annotated.html", [
[ "Class List", "annotated.html", "annotated_dup" ],
[ "Class Index", "classes.html", null ],
Expand All @@ -49,7 +47,7 @@ var NAVTREEINDEX =
"a00523.html#a9f8ee827a130d35f3cd1ae2b28eb0310",
"a00615.html#aec4e078b46f775b90d01038bab518c57",
"a00695.html#a27469f9c1ac7f0c4d1c86fdfc3000b0e",
"functions_func_p.html"
"functions_func_g.html"
];

var SYNCONMSG = 'click to disable panel synchronisation';
Expand Down
Loading

0 comments on commit c8bb1b4

Please sign in to comment.