xiv Microsoft Visual Studio 2010: A Beginner’s Guide
Assigning MasterPage Files ................................................... 258
Partial Views (a.k.a. User Controls) .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . .. . 260
Managing Routing .................................................................. 262
Building a Customer Management Application .. .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . . 264
Creating a Repository ......................................................... 265
Creating a Customer Controller ............................................... 268
Displaying a Customer List ................................................... 269
Adding a New Customer ...................................................... 274
Updating Existing Customers ................................................. 279
Deleting a Customer .......................................................... 281
Summary ........................................................................... 284
10 Designing Silverlight Applications . .. . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . . 285
Starting a Silverlight Project ........................................................ 286
Navigating the Silverlight Designer ................................................. 290
Using Silverlight Controls .......................................................... 290
Running Silverlight Out-of-Browser (OOB) .. .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. 294
Deploying Silverlight Applications .................................................. 297
Summary ........................................................................... 298
11 Deploying Web Services with WCF .. . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . . 299
Starting a WCF Project ............................................................. 301
Specifying a Contract with WCF Interfaces . .. . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . . 302
Implementing Logic with WCF Classes .. . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . . 308
Hosting a WCF Service ............................................................. 314
Following General Hosting Procedures ... . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . . 315
Installing IIS 7 on Windows 7 ................................................. 315
Creating a Web Site on IIS 7 on Windows 7 ... . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . . 317
Deploying the WCF Service to IIS ............................................ 321
Communicating with a WCF Service ................................................ 326
Creating a Service Reference ................................................. 326
Coding Web Service Calls .................................................... 329
Deploying a Client That Consumes a Web Service . .. . .. .. . .. .. . .. .. . .. .. . .. .. 336
Creating a Web Service in a Web Site .. .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. 337
Summary ........................................................................... 338
PART IV Enhancing the VS 2010 Experience
12 Customizing the Development Environment .. .. .. . .. .. . .. .. . .. .. . .. .. . .. . 341
Implementing Custom Templates ................................................... 342
Creating New Project Templates .............................................. 343
Creating New Item Templates ................................................. 347
Creating Custom Snippets .......................................................... 353
Creating a New Snippet ....................................................... 353
Managing the Snippet Library ................................................ 358