Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. RIA Service not generating custom property

RIA Service not generating custom property

Scheduled Pinned Locked Moved WPF
helpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Icarus123
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups