请问如何在wcf使用泛型的契约 ???
[ServiceContract]
public interface ITest
{
[OperationContract]
T GetEntity<T>();
}
public interface ITest
{
[OperationContract]
T GetEntity<T>();
}
就是上面这样,当我更新服务时出错了。提示泛型无效。请问如何解决。
我尝试在接口前面加上[ServiceKnownType(typeof(具体类)]但还是无效。
高手指点一二。
posted on 2009-08-05 00:11 asp.net.asp.net 阅读(422) 评论(1) 收藏 举报
浙公网安备 33010602011771号