Hi
In our WCF service, there is a datamember of type object. Due to this datamember ,we are not able to access the method. ie the method is displaying with error while we run the service.
We have declared the datamember as
[DataMember]
public object Value
{
get { return this.value; }
set { this.value = value; }
}
When we comment out the above code, the method will start displaying without error.
Please refer the attached screen shot.
Any help from your side is appreciated.
Loading
Resmi SatishPosted May 16, 2014, 5:00 AM
However the datacontract is having a datamember of type dataset and a data member of type
generic list. When I am consuming the service, the service is throwing the error as
Error 1 Cannot implicitly convert type 'System.Collections.Generic.List
I have used the below command for creating proxy.
svcutil.exe http://localhost:55986/Service.svc /collectionType:System.Collections.Generic.List`1
I have declare as follows
[DataContract]
public class SQLCommand
{
string storedProcedureName = string.Empty;
List
List
DataSet resultDataSet;
[DataMember]
public DataSet ResultDataSet
{
get { return resultDataSet; }
set { resultDataSet = value; }
}
[DataMember]
public List
{
get { return primaryKeys; }
set { primaryKeys = value; }
}
[DataMember]
public string StoredProcedureName
{
get { return storedProcedureName; }
set { storedProcedureName = value; }
}
[DataMember]
public List
{
get { return parameters; }
set { parameters = value; }
}
}
Please guide me how to use dataset as a datamember in WCF.
Gopi ChandPosted May 14, 2014, 9:53 AM
Anupam SinghPosted May 14, 2014, 9:13 AM
However we do use complex type but we define serialization and deserilization for those.
read this
hope will help
Resmi SatishPosted May 14, 2014, 8:51 AM
Can you please confirm me whether we can use object type or not
Anupam SinghPosted May 14, 2014, 8:10 AM