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