O'Reilly logo

Microsoft® .NET: Architecting Applications for the Enterprise by Dino Esposito and Andrea Saltarello

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

Crafting Your Own Data Access Layer

Under the covers of the data context class, a number of interesting things happen that represent the body and soul of the DAL. A DAL is about persistence, management of business transactions, concurrency, lazy loading, maybe caching, and more. In this section, we’ll basically go through the typical responsibilities we’ve already identified for a DAL.

Implementing the Persistence Layer

The main purpose of the persistence layer is to provide a mapping between the types in the domain logic and physical tables in the DBMS. You resort to data context methods such as Add, Delete, or Update when you just want to make persistent any changes (insertions, deletions, or updates) to objects in the domain model.

So with an ...

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