70-516 · Question #15
You use Microsoft Visual Studio 2010 and the Microsoft .NET Framework 4.0 to create an application. The application connects to a Microsoft SQL Server database. The application uses DataContexts to…
The correct answer is D. Modify the foreign key between the Customers and Orders tables to enable the ON DELETE. DataContext.ExecuteDynamicDelete Method us/library/system.data.linq.datacontext.executedynamicdelete.aspx)
Question
You use Microsoft Visual Studio 2010 and the Microsoft .NET Framework 4.0 to create an application. The application connects to a Microsoft SQL Server database. The application uses DataContexts to query the database. You define a foreign key between the Customers and Orders tables in the database. You need to ensure that when you delete a customer record, the corresponding order records are deleted. You want to achieve this goal by using the minimum amount of development effort. What should you do?
Options
- AOverride the Delete operation of the customer entity.
- BRemove the foreign key between the Customers and Orders tables.
- CUse the ExecuteDynamicDelete method of the DataContext object.
- DModify the foreign key between the Customers and Orders tables to enable the ON DELETE
How the community answered
(30 responses)- A3% (1)
- B10% (3)
- C3% (1)
- D83% (25)
Explanation
DataContext.ExecuteDynamicDelete Method us/library/system.data.linq.datacontext.executedynamicdelete.aspx)
Topics
Community Discussion
No community discussion yet for this question.