284Microsoft Visual Studio 2010: A Beginner’s Guide

Listing 9-13 has content removed to avoid duplicating code you’ve already seen. Near the top of the listing, you can see the if statement that will check to see if there is a value in TempData["Result"] (TempData("Result") in VB) and will display that value in a label if present. Next to the Edit ActionLink, the Details ActionLink has been changed to a Delete ActionLink, passing the id of the current customer back to the Controller for deletion.

Summary

You now know the essential parts of MVC: Models, Views, and Controllers. You saw how to implement the repository pattern for managing a data access layer and simplify the code. This chapter showed how to create controllers and views. You also learned about routing and how it helps match URLs to controllers, actions, and parameters. Finally, there was a section that demonstrated how to perform CRUD operations with ASP.NET MVC.

Another popular Web technology is Silverlight, which gives you the ability to create rich user experiences. The next chapter helps you get started with Silverlight development.

Page 307
Image 307
Microsoft 9GD00001 manual Summary