-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF
In this section, we will add a Service Layer to our design.
Decision Point: Service Layer
You should only introduce a service layer in your project if it's needed. Each new architectural feature we will cover in this text will provide benefits for a cost. It's extremely important that you are familiar with the trade-offs and only add what you need. If you are writing an internal tool, adding a Service Layer might be overkill and provide no ROI to your project.
To add a Service Layer to Northwind, perform the following steps:
Add a new WCF Service Library project to your solution called Northwind.Service and delete the files IService1.cs and Service1.cs ,from the project.
Add a project reference from Northwind.Service to Northwind.Data and a .NET reference from System.Data.Entity to Northwind.Data.
Add a file called Customer.cs to Northwind.Service and update it, as shown in the following code:
using System.Runtime.Serialization;
namespace Northwind.Service
{
[DataContract...
Change the font size
Change margin width
Change background colour