annotate Tools/DocGen/Content/Doc/DataAccess/AbstractAccessor.htm @ 9:1e85f66cf767 default tip

update bltoolkit
author nickolay
date Thu, 05 Apr 2018 20:53:26 +0300
parents f990fcb411a9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
1 <% group # Abstract accessors %>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
2 <% order # 20 %>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
3
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
4 <p class="j">The following example demonstrates how to create and use an abstract data accessor class.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
5 All abstract methods of the class are generated at run-time depending on each method declaration.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
6 Every part of the method declaration is important.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
7 Method's return value specifies one of the Execute methods in the following way:
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
8 <table class='data'>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
9 <tr><th>Return Type</th><th>Execute Method</th></tr>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
10 <tr><td><i>IDataReader</i> interface</td><td>ExecuteReader</td></tr>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
11 <tr><td>Subclass of <i>DataSet</i></td><td>ExecuteDataSet</td></tr>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
12 <tr><td>Subclass of <i>DataTable</i></td><td>ExecuteDataTable</td></tr>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
13 <tr><td>Class implementing the <i>IList</i> interface</td><td><a href="ExecuteList.htm">ExecuteList</a> or <a href="ExecuteList.htm">ExecuteScalarList</a></td></tr>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
14 <tr><td>Class implementing the <i>IDictionary</i> interface</td><td><a href="ExecuteDictionary.htm">ExecuteDictionary</a> or <a href="ExecuteDictionary.htm">ExecuteScalarDictionary</a></td></tr>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
15 <tr><td><i>void</i></td><td>ExecuteNonQuery</td></tr>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
16 <tr><td><i>string</i>, <i>byte[]</i> or value type</td><td><a href="ExecuteScalar.htm">ExecuteScalar</a></td></tr>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
17 <tr><td>In any other case</td><td><a href="ExecuteObject.htm">ExecuteObject</a></td></tr>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
18 </table>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
19 Method name explicitly defines action name which is converted to stored procedure name.<br/>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
20 Type, sequential order, and name of the method parameters is mapped to the command parameters.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
21 Exceptions from this rule are:
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
22 <br>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
23 <div style="margin:-10px 0px -10px -10px"><ul compact="compact">
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
24 <li>a parameter of <a href="../Data/index.htm"><i>DbManager</i></a> type. In this case generator uses provided <a href="../Data/index.htm"><i>DbManager</i></a> to call the command.</li>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
25 <li>parameters decorated with attribute <i>FormatAttribute</i>.</li>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
26 </ul></div>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
27 </p>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
28 AbstractAccessor.cs
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
29 <% ..\..\..\HowTo\DataAccess\AbstractAccessor.cs %>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
30 <a name='Person'></a>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
31 Person.cs
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
32 <% ..\..\..\HowTo\DataAccess\Person.cs %>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
33 Gender.cs
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
34 <% ..\..\..\HowTo\DataAccess\Gender.cs %>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
35 App.config
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
36 <% Doc\Data\App.config %>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
37 <a href="../Data/CreateSql.htm">Create.sql script</a>