| 0 | 1 <% group # SQL text generation control attributes %> | 
|  | 2 <p class='j'> | 
|  | 3 The <b>PrimaryKey</b> attribute indicates the field that is a part of a primary key. | 
|  | 4 </p> | 
|  | 5 | 
|  | 6 PrimaryKey.cs | 
|  | 7 <% ..\..\..\HowTo\DataAccess\PrimaryKey.cs %> | 
|  | 8 <i>DataAccessor.SelectByKeySql</i> method generates and executes the following SQL statement: | 
|  | 9 <% sql # | 
|  | 10 SELECT | 
|  | 11 	[MiddleName], | 
|  | 12 	[PersonID], | 
|  | 13 	[LastName], | 
|  | 14 	[FirstName] | 
|  | 15 FROM | 
|  | 16 	[Person] | 
|  | 17 WHERE | 
|  | 18 	[PersonID] = @PersonID | 
|  | 19 %> | 
|  | 20 MultiplePrimaryKey.cs | 
|  | 21 <% ..\..\..\HowTo\DataAccess\MultiplePrimaryKey.cs %> | 
|  | 22 In this case <i>DataAccessor.SelectByKeySql</i> method generates and executes the following SQL statement: | 
|  | 23 <% sql # | 
|  | 24 SELECT | 
|  | 25 	[MiddleName], | 
|  | 26 	[PersonID], | 
|  | 27 	[LastName], | 
|  | 28 	[FirstName] | 
|  | 29 FROM | 
|  | 30 	[Person] | 
|  | 31 WHERE | 
|  | 32 	[FirstName] = @FirstName AND | 
|  | 33 	[LastName] = @LastName | 
|  | 34 %> | 
|  | 35 App.config | 
|  | 36 <% Doc\Data\App.config %> | 
|  | 37 <a href="../Data/CreateSql.htm">Create.sql script</a> |