Modeling the Northwind database
In the previous section we renamed the RealNorthwind
solution, LINQNorthwind
solution. Next we will apply LINQ to Entities to this new solution, LINQNorthwind
.
For the data access layer, we will use LINQ to Entities instead of the raw ADO.NET data adapters. As you will see in the next section, we will use one LINQ statement to retrieve product information from the database and the update LINQ statements will handle the concurrency control for us easily and reliably.
As you may recall, to use LINQ to Entities in the data access layer of our WCF service, we first need to add an Entity data model to the project. The following steps are very similar to those described in the previous chapter. You can refer back to that chapter for more information and screenshots if necessary.
In Solution Explorer, right-click on the project item,
LINQNorthwindDAL
, select menu option Add | New Item…, and then choose Visual C# Items | ADO.NET Entity Data Model as the Template and...