摘要:
WCF的服务需要一个宿主程序来承载。我们可以选择用Windows Activation Service(WAS,for vista),IIS,WPF,Windows Form,Console或Windows Service程序来当作wcf的宿主程序。 在上一篇中我们没有提到宿主程序的概念但也能运行,其实是宿主在IIS上,还记得我们需要在IIS配置虚拟目录么。现在我们用其它的方式来宿主,并实现一个服... 阅读全文
摘要:
数据契约[DataContract] public class Employee { [DataMember] public int ID; [DataMember] public string Name; }操作契约[ServiceContract] public interface IEmployeeService { [OperationContract] void AddEmployee(... 阅读全文