To make it easier to do that, you will create a view in the database.The view will consist of just the data needed by the drop-down list: the full name (properly formatted) and the record key.
The following illustration shows the difference between a business-logic class that includes data-access logic without a repository and one that uses a repository.
In a production application, you would provide a specific error message when a database constraint prevents a deletion, or you would specify a cascading delete.
For an example of how to specify a cascading delete, see The Entity Framework and ASP. page that you will be creating, you want to provide a drop-down list of instructors, with names in "last, first" format so that users can select department administrators.
NET Web Forms applications using the Entity Framework 4.0 and Visual Studio 2010.
The sample application is a website for a fictional Contoso University.