Follow these steps to create a simple WCF service, which we will integrate into a WPF application later in this chapter:
- First, create a new project named EmployeeService. Use the WCF Service Application template while creating the project. You can find this under the WCF template category, as shown in the following screenshot:
- Visual Studio, by default, creates three service files (IService1.cs, Service1.svc, and Service1.svc.cs) inside the project. As we will create our own services from scratch, from Solution Explorer, let's delete all three of the files:
- Let's create two folders inside the project node and name them DataModels and Services. This is optional, but it is a good idea to keep the code files organized:
- Now, right-click on the DataModels folder, and follow the context menu entry Add | Class... to create a new class file named Employee.
- Inside the class implementation of the Employee.cs file, add a few public properties of type string,...