Hi, I have the following demo code:
[Serializable]
[DataContract(Name = "A", Namespace = "")]
[KnownType(typeof(B))]
public class A
{
public A()
{
Id = 0;
b = new B();
}
\[Key\]
\[DataMember\]
public int Id { get; set; }
\[DataMember\]
public B b { get; set; }
}
[Serializable]
[DataContract(Name = "B", Namespace = "")]
public partial class B : ComplexObject
{
public B()
{
Id = 0;
Description = string.Empty;
}
\[Key\]
\[DataMember\]
public int Id { get; set; }
\[DataMember\]
public string Description { get; set; }
}
The problem that I am having is that the RIA service is only generating the following object:
/// <summary>
/// The 'A' entity class.
/// </summary>
[DataContract(Namespace="", Name="A")]
public sealed partial class A : Entity
{
private int \_id;
#region Extensibility Method Definition
#endregion
Can anyone please help me fix this problem, or explain why it does not generate the custom "B" Property? Thanks