Creating WCF service
In this task we will create a WCF service using VS2010 targeted for .NET 4.0 framework.
Step 1: Open VS2010 and create a blank solution, name it as ‘SILV4_Converters’. To this solution, add a WCF service and name it as ‘WCF4_ImageService’.
Step 2: Add the following interface and the DataContract class in ‘IService1.cs’:
C#
using System.Runtime.Serialization;
using System.ServiceModel;
Namespace WCF4_ImageService
{
[ServiceContract]
Public Interface IService
{
[OperationContract]
ImageEmployee[] GetAllEmp();
}
[DataContract]
Public Class ImageEmployee
{
[DataMember]
public int EmpNo { get; set; }
[DataMember]
public string EmpName { get; set; }
Read more: dot net curry.com