Skip to content

Instantly share code, notes, and snippets.

@rahulsahay19
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahulsahay19/5e885c81b6415bb978db to your computer and use it in GitHub Desktop.
Save rahulsahay19/5e885c81b6415bb978db to your computer and use it in GitHub Desktop.
Sample WCF Implementation
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
namespace EmployeeService
{
[DataContract]
public class Employee
{
[DataMember]
public string Fname { get; set; }
[DataMember]
public string Lname { get; set; }
[DataMember]
public string Designation { get; set; }
}
[ServiceContract]
public interface IEmployeeService
{
[OperationContract]
void SubmitEmployee(Employee Emp);
[OperationContract]
List<Employee> PrintEmployees();
}
public class EmployeeService : IEmployeeService
{
public void SubmitEmployee(Employee Emp)
{
throw new NotImplementedException();
}
public List<Employee> PrintEmployees()
{
throw new NotImplementedException();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment