我的WCF服务与svcutil生成的类型(基于表列)一起使用,如下所示:
///Represents the strongly named DataTable class.
///</summary>
[global::System.Serializable()]
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
public partial class tblQPlanInteractionsDataTable : global::System.Data.TypedTableBase<tblQPlanInteractionsRow> {
private global::System.Data.DataColumn columniInteractionID;
...
public tblQPlanInteractionsDataTable() {
this.TableName = "tblQPlanInteractions";
this.BeginInit();
this.InitClass();
this.EndInit();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public tblQPlanInteractionsRow AddtblQPlanInteractionsRow(
long iInteractionID,
...
它在以下方法中使用:
[OperationContract]
BaseQualityPlanInteractions.tblQPlanInteractionsDataTable GetInteractionById(string loginToken, LongIdWithSite interactionId);
但是,即使服务器端包含一些数据,客户端每次也会收到0行。
客户端的目标框架-.NET 4.6
服务器.NET 3.5