Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 27. Building Layered Web Applications

Chapter 27. Building Layered Web Applications

In Chapter 12, you learned how to create websites using Entity Framework’s ASP.NET EntityDataSource control. While this approach is fast, it uses data access code that is tied directly to the user interface. You’ve since learned a lot more about working with the Entity Framework, so we’ll finish this book with a look at some better ways to use entities in better architected web applications. Several of these techniques are new to Entity Framework in .NET 4. The introduction of POCO support enables many new possibilities, such as the use of the repositories you built in Chapter 24. Foreign keys and the new state modification methods (e.g., ObjectStateManager.ChangeState) provide more control when working with EntityObject or POCO entities.

In this chapter, you’ll first learn about the life cycle of web pages in a web application and how that impacts some of the choices you will have to make when planning to use the Entity Framework as your data access layer in a tiered application. Then you will build two very different types of web applications, though both will take advantage of the repositories from Chapter 24.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial