none
How can I use metadata attribute to wcf RRS feed

  • Question

  • using System;
    using System.ComponentModel.DataAnnotations;
    using System.Runtime.Serialization;
    
    namespace ClassLibrary1
    {
        public partial class Class1
        {
            public Class1 Class1Property { get; set; }
    
            public String StringProperty { get; set; }
        }
    
        [MetadataType(typeof(Class1Metadata))]
        public partial class Class1
        {
            [DataContract(IsReference = true)]
            internal sealed class Class1Metadata
            {
                public Class1Metadata()
                {
                }
    
                [DataMember]
                public Class1 Class1Property { get; set; }
    
                [DataMember]
                public String StringProperty { get; set; }
            }
        }
    }

    How do I write code in the example above. My goal to create master class with a separate metadata information.
    Monday, September 5, 2011 2:30 PM

Answers