public static int InsertEmployee(EmployeeViewModel emp) { using (NorthwindServiceContractClient proxy = new NorthwindServiceContractClient("netTCP_EndPoint")) { return(proxy.InsertEmployee(Mapper.Map(emp))); } }
public static string[] SelectEmployeeTitles() { using (NorthwindServiceContractClient proxy = new NorthwindServiceContractClient("netTCP_EndPoint")) { return(proxy.SelectEmployeeTitles()); } }
public static EmployeeViewModel[] SelectEmployeesByTitle(string title) { using (NorthwindServiceContractClient proxy = new NorthwindServiceContractClient("netTCP_EndPoint")) { EmployeeViewModel[] employees = Mapper.Map(proxy.SelectEmployeesByTitle(title).ToList()); return(employees); } }