Database Reference
In-Depth Information
end
go
create procedure [chapter10].[DeleteAthlete]
(@AthleteId int)
as
begin
delete from Chapter10.Athlete where AthleteId = @AthleteId
end
2.
Right-click the design surface and select Update Model from Database. Select the new
stored procedures from Listing 10-19 and click Finish. This will add the stored procedures
to the model.
3.
Right-click the Athlete Entity, and select Stored Procedure Mapping. Select the stored
procedures for each of the actions. For the Insert action, map the return column AthleteId
for the Insert action to the AthleteId property (see Figure 10-10 ).
Figure 10-10. Mapping the stored procedures, parameters, and return values for the Insert, Update, and Delete actions
Search WWH ::




Custom Search