I have a xxxBLL, xxxDAL and xxxInfo classes in my web application. I would like to use WCF and Silverlight and make sure my xxxInfo objects can be consumed by a Silverlight control. In my research I have seen that people add DataContract and DataMember
to their classes. Do I have to add these attributes to my ProductInfo, CustomerInfo, CategroyInfo etc classes to make it work with Silverlight? For example:
[DataContract]
public class User
{
[DataMember]
public bool IsMember { get; set; }
newbie06
Member
625 Points
458 Posts
make objects consumable/databindable for Silverlight controls
Dec 07, 2008 10:50 PM|LINK
I have a xxxBLL, xxxDAL and xxxInfo classes in my web application. I would like to use WCF and Silverlight and make sure my xxxInfo objects can be consumed by a Silverlight control. In my research I have seen that people add DataContract and DataMember to their classes. Do I have to add these attributes to my ProductInfo, CustomerInfo, CategroyInfo etc classes to make it work with Silverlight? For example:
[DataContract]
public class User
{
[DataMember]
public bool IsMember { get; set; }
[DataMember]
public string Name { get; set; }
[DataMember]
public int Age { get; set; }
}