O'Reilly logo

WCF 4.0 Multi-tier Services Development with LINQ to Entities by Mike Liu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using LINQ to Entities in the data access layer

Now we have the solution, the Entity model, and the connection string. Next we will modify the data access layer to use LINQ to Entities to retrieve and update products. We will first modify GetProduct to retrieve a product from the database and then modify UpdateProduct to update a product in the database. In this section the UpdateProduct method will not have concurrency control. It will simply commit the changes to the database even though the product has been changed by other users. In the upcoming section, Adding concurrency support, we will make further changes to the service so that concurrent updates can be controlled properly.

Modifying GetProduct in the data access layer

We can now modify ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required