我在将实体集合从 LLBLGen 传递回 silverlight 时遇到问题。我的合同是这样的。我什至不知道这是否可能。
我的网络服务代码如下所示:
public IEnumerable<WaterWorksCustomersEntity> GetCustomer(long custId, string acctKey)
{
var toReturn = new WaterWorksCustomersEntity(custId, acctKey);
using (var adapter = new DataAccessAdapter())
{
adapter.ConnectionString = "data source=CWCPROD.cwc.local;user..";
adapter.FetchEntity(toReturn);
}
IList<WaterWorksCustomersEntity> customers = new List<WaterWorksCustomersEntity>();
customers.Add(toReturn);
return customers;
}
在我正在做的silverlight客户端上......
var client = new Service1Client();
client.GetCustomerCompleted += new EventHandler<GetCustomerCompletedEventArgs>(client_GetCustomerCompleted);
client.GetCustomerAsync(2,"110865");
编译失败并出现此错误:
错误 1 命名空间“AppointmentClientSL.ServiceReference1”中不存在类型或命名空间名称“ArrayOfXElement”(您是否缺少程序集引用?) c:\work\Appointment\Appointment\AppointmentClientSL\Service References\ServiceReference1\Reference.cs 63 54 预约客户SL
看起来 SL 无法处理 Web 服务返回的数据。
谁能帮忙???