So, i have this class that is referenced in both client and server app:
However when i pass it from the client app to WCF with data, i get an empty class (=null) . I went to the client service configuration and changed the type to system.collection.generic.list but still it will return null.
Any help?
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
namespace WcfDataService
{
[DataContract]
[Serializable]
public class MainDataClassLocal
{
[DataMember(Name= "AllowDBNull")]
public bool AllowDBNull { get; set; }
[DataMember(Name = "Caption")]
public string Caption { get; set; }
[DataMember(Name = "ColumnName")]
public string ColumnName { get; set; }
[DataMember(Name = "Datatype")]
public string Datatype { get; set; }
[DataMember(Name = "MaxLength")]
public int MaxLength { get; set; }
[DataMember(Name = "Readonly")]
public bool Readonly { get; set; }
}
[DataContract]
[Serializable]
public class RootObjectLocal
{
public List<MainDataClassLocal> maindataclassLocal { get; set; }
}
}
Any help?