How Do I: Work with Model Binders in an MVC Application?

by Chris Pels

In this video Chris Pels shows how to use model binders to bind form data to complex business objects in models in an MVC application. First, an MVC application is created along with a simple model for a Customer class along with a controller and view for editing the customer data. Then, the automatic model binding of MVC is demonstrated with the customer class. Next, the Bind attribute is discussed and demonstrated as a mechanism for controlling the details of the binding process to include and exclude specific properties of a complex object. Finally, the use of namespace prefixes for segmenting form data on a page is discussed.

▶ Watch video (17 minutes)