Figure 15-9 shows the designer with the Properties page opened after clicking on the SalesOrderHeader
entity in the entity class pane. Notice that the Properties page has Delete, Insert, and Update properties.
The default value for these properties is Use Runtime.
Figure 15-9
To change the default behavior and assign a stored procedure to perform the insert, update, or delete
operation, drag and drop the stored procedure that performs the operation into the Methods pane on the
designer. Next, click on the entity in the entity class pane of the designer, and on the Properties page,
293
Part III: LINQ to SQL
click the ellipsis button for the appropriate property (Delete, Insert, or Update) to the Configure Behavior
dialog shown in Figure 15-10.
Figure 15-10
The Configure Behavior dialog enables you to override the default behavior by specifying the class in
which to override the behavior, the type of behavior (Insert, Update, or Delete), and the method (stored
procedure) to use to override the behavior. Select the Customize option to select the desired stored procedure
(method), see the above figure.
Pages:
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468