Both scenarios are shown in the following example. The first Parameter attribute specifies
the return parameter type, and the second specifies the input variable type.
[StoredProcedure(Name="OrdersBySalesPersonID")]
[return: Parameter(DbType = "numeric")]
public IEnumerable MaxOrderBySalesPersonID([Parameter(DbType = "int")]
String param1)
{
IExecuteResults results = this.ExecuteMethodCall
(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())),
param1);
}
Stored procedure, user-defined function, and parameter mappings are discussed in more detail
in Chapter 11.
The Basics of Relational Data
LINQ to SQL is all about working with relational data. As you have learned, this is accomplished through
the mapping of the relational data model to an object model expressed in the developer??™s programming
language. But regardless of the programming language and the object models, you are working with
data. It all boils down to CRUD operations; you are creating (inserting), reading, updating, or deleting
data??”CRUD.
Pages:
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345