Hi, How to call WCF Service from MVC web api and bind the service model into MVC model? Can you please help ?????
[DataContract]
public class Employee
{
[DataMember]
public int Id { get; set; }
[DataMember]
public string Name { get; set; }
[DataMember]
public int Age { get; set; }
}
This is the employee class
EndpointAddress endpointAddress = new EndpointAddress(ConfigurationManager.AppSettings["ServiceKey"]);
string endpointConfigurationName = "SampleSerVice";
ClassProxy obj = new ClassProxy(endpointConfigurationName, endpointAddress);
var result = obj.GetEmployeeName();
result returns the list of employee, but how to bind this to MVC Model