Gridview rowupdating objectdatasource
You will also create an abstraction layer between your BLL and DAL that facilitates automated unit testing of the BLL.
This abstraction layer is implemented by creating an interface and using the interface when you instantiate the repository in the business-logic class.
This tutorial series builds on the Contoso University web application that is created by the Getting Started with the Entity Framework 4.0 tutorial series.
If you didn't complete the earlier tutorials, as a starting point for this tutorial you can download the application that you would have created.
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.
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.
In the Foreign Key Relationships box click Add, then click the ellipsis for Tables and Columns Specification.
In the Tables and Columns dialog box, set the primary key table and field to table if that person is a department administrator.
Because you write your own data-access code, it's easier to do more than just read, insert, update, or delete a specific entity type, which are the tasks that the control is designed to perform.
For example, you can perform logging every time an entity is updated, archive data whenever an entity is deleted, or automatically check and update related data as needed when inserting a row with a foreign key value. For example, when you update a department, you might need to validate that no other departments have the same administrator because one person cannot be administrator of more than one department.