【发布时间】:2014-04-18 00:03:52
【问题描述】:
在我的服务中,我有一个返回布尔值的方法,但后来我将其更改为 IList,我更新了 服务通过右键单击服务参考并进行更新。然而,更新并没有更新方法返回值。对于此代码,我收到一条错误消息,显示“无法将类型 bool 隐式转换为 System.Collection.Generic.IList<..>”
patientService.SavePatient(personID, firstName, lastName, causeOfVisit,(s, e) => PatientData = e.Result);
服务中的方法:
[OperationContract]
public IList<Patient> SavePatient(string personId, string firstName, string lastName, DateTime TimeOfArrival, string causeOfVisit)
{
patientRepository.SavePatient(personId, firstName, lastName, TimeOfArrival, causeOfVisit);
return patientRepository.Patients;
}
我该如何解决这个问题?
【问题讨论】:
-
您使用的是
Silverlight-enabled WCF service还是只使用WCF服务? -
更新服务引用前是否重启了服务?
-
启用 Silverlight 的 WCF 服务!重启?
-
删除引用并再次尝试添加
-
我这样做了,没用。
标签: wcf silverlight