locked
Parent child relationship RRS feed

  • Question

  •  Hi, this code won't create service reference.

    public class Base
    {
        
    public int ID { get; set; }
    }

    public class Container : Base
    {
        public Container Parent { get; set; }
    }

    public class Node : Container
    {
        
    public string Name { get; set; }
    }

    The problem is in red. Without the "Parent" all works well

    Error message

    Writing object layer file...
    error 7001: Unexpected end of file has occurred. The following elements are not
    closed: End, AssociationSet, EntityContainer, Schema, edmx:DataServices, edmx:Edmx. Line 104, position 23.

    Monday, January 12, 2009 7:05 PM

Answers

  • Hi,

     Navigation properties on Derived types are not supported in this release.

     Please move the navigation property "Parent" to the base type "Base" and then this should work


    Phani Raj Astoria http://blogs.msdn.com/PhaniRaj
    Monday, April 19, 2010 4:54 PM
    Moderator