﻿//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

// Generation date: 1/29/2016 11:00:46 AM
namespace Microsoft.OData.Client.TDDUnitTests.Tests.Materialization
{
    /// <summary>
    /// There are no comments for DefaultContainer in the schema.
    /// </summary>
    public partial class DefaultContainer : global::Microsoft.OData.Client.DataServiceContext
    {
        /// <summary>
        /// Initialize a new DefaultContainer object.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public DefaultContainer(global::System.Uri serviceRoot) :
            base(serviceRoot, global::Microsoft.OData.Client.ODataProtocolVersion.V4)
        {
            this.ResolveName = new global::System.Func<global::System.Type, string>(this.ResolveNameFromType);
            this.ResolveType = new global::System.Func<string, global::System.Type>(this.ResolveTypeFromName);
            this.OnContextCreated();
            this.Format.LoadServiceModel = GeneratedEdmModel.GetInstance;
            this.Format.UseJson();
        }
        partial void OnContextCreated();
        /// <summary>
        /// Since the namespace configured for this service reference
        /// in Visual Studio is different from the one indicated in the
        /// server schema, use type-mappers to map between the two.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        new protected global::System.Type ResolveTypeFromName(string typeName)
        {
            global::System.Type resolvedType = this.DefaultResolveType(typeName, "NS", "Microsoft.OData.Client.TDDUnitTests.Tests.Materialization");
            if ((resolvedType != null))
            {
                return resolvedType;
            }
            return null;
        }
        /// <summary>
        /// Since the namespace configured for this service reference
        /// in Visual Studio is different from the one indicated in the
        /// server schema, use type-mappers to map between the two.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        protected string ResolveNameFromType(global::System.Type clientType)
        {
            if (clientType.Namespace.Equals("Microsoft.OData.Client.TDDUnitTests.Tests.Materialization", global::System.StringComparison.Ordinal))
            {
                return string.Concat("NS.", clientType.Name);
            }
            return clientType.FullName;
        }
        /// <summary>
        /// There are no comments for AbstractETs in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::Microsoft.OData.Client.DataServiceQuery<AbstractET> AbstractETs
        {
            get
            {
                if ((this._AbstractETs == null))
                {
                    this._AbstractETs = base.CreateQuery<AbstractET>("AbstractETs");
                }
                return this._AbstractETs;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::Microsoft.OData.Client.DataServiceQuery<AbstractET> _AbstractETs;
        /// <summary>
        /// There are no comments for AbstractBaseETs in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::Microsoft.OData.Client.DataServiceQuery<AbstractBaseET> AbstractBaseETs
        {
            get
            {
                if ((this._AbstractBaseETs == null))
                {
                    this._AbstractBaseETs = base.CreateQuery<AbstractBaseET>("AbstractBaseETs");
                }
                return this._AbstractBaseETs;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::Microsoft.OData.Client.DataServiceQuery<AbstractBaseET> _AbstractBaseETs;
        /// <summary>
        /// There are no comments for BaseETs in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::Microsoft.OData.Client.DataServiceQuery<BaseET> BaseETs
        {
            get
            {
                if ((this._BaseETs == null))
                {
                    this._BaseETs = base.CreateQuery<BaseET>("BaseETs");
                }
                return this._BaseETs;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::Microsoft.OData.Client.DataServiceQuery<BaseET> _BaseETs;
        /// <summary>
        /// There are no comments for DerivedETs in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::Microsoft.OData.Client.DataServiceQuery<ET> DerivedETs
        {
            get
            {
                if ((this._DerivedETs == null))
                {
                    this._DerivedETs = base.CreateQuery<ET>("DerivedETs");
                }
                return this._DerivedETs;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::Microsoft.OData.Client.DataServiceQuery<ET> _DerivedETs;
        /// <summary>
        /// There are no comments for AbstractETs in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public void AddToAbstractETs(AbstractET abstractET)
        {
            base.AddObject("AbstractETs", abstractET);
        }
        /// <summary>
        /// There are no comments for AbstractBaseETs in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public void AddToAbstractBaseETs(AbstractBaseET abstractBaseET)
        {
            base.AddObject("AbstractBaseETs", abstractBaseET);
        }
        /// <summary>
        /// There are no comments for BaseETs in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public void AddToBaseETs(BaseET baseET)
        {
            base.AddObject("BaseETs", baseET);
        }
        /// <summary>
        /// There are no comments for DerivedETs in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public void AddToDerivedETs(ET eT)
        {
            base.AddObject("DerivedETs", eT);
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private abstract class GeneratedEdmModel
        {
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
            private static global::Microsoft.OData.Edm.IEdmModel ParsedModel = LoadModelFromString();
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
            private const string Edmx = @"<edmx:Edmx Version=""4.0"" xmlns:edmx=""http://docs.oasis-open.org/odata/ns/edmx"">
  <edmx:DataServices>
    <Schema Namespace=""NS"" xmlns=""http://docs.oasis-open.org/odata/ns/edm"">
      <EnumType Name=""EnumT"">
        <Member Name=""EnumP1"" Value=""0"" />
        <Member Name=""EnumP2"" Value=""1"" />
        <Member Name=""EnumP3"" Value=""2"" />
      </EnumType>
      <ComplexType Name=""AbstractCT"" Abstract=""true"" />
      <ComplexType Name=""AbstractBaseCT"" BaseType=""NS.AbstractCT"" Abstract=""true"">
        <Property Name=""CP0"" Type=""Edm.Int32"" Nullable=""false"" />
      </ComplexType>
      <ComplexType Name=""BaseCT"" BaseType=""NS.AbstractBaseCT"">
        <Property Name=""CP1"" Type=""Edm.Int32"" Nullable=""false"" />
      </ComplexType>
      <ComplexType Name=""CT"" BaseType=""NS.BaseCT"">
        <Property Name=""CP2"" Type=""Edm.Int32"" Nullable=""false"" />
      </ComplexType>
      <EntityType Name=""AbstractET"" Abstract=""true"" />
      <EntityType Name=""AbstractBaseET"" BaseType=""NS.AbstractET"" Abstract=""true"">
        <Property Name=""EP0"" Type=""Edm.Int32"" Nullable=""false"" />
        <Property Name=""EAbsCTP"" Type=""NS.AbstractCT"" Nullable=""false"" />
        <Property Name=""EColOfAbsCTP"" Type=""Collection(NS.AbstractCT)"" Nullable=""false"" />
        <Property Name=""EColOfNullableAbsCTP"" Type=""Collection(NS.AbstractCT)"" />
        <Property Name=""EColOfNullableInt"" Type=""Collection(Edm.Int32)"" />
        <Property Name=""EColOfInt"" Type=""Collection(Edm.Int32)"" Nullable=""false"" />
        <Property Name=""ENullableEnum"" Type=""NS.EnumT"" />
        <Property Name=""ENullableAbsCTP"" Type=""NS.AbstractCT"" />
      </EntityType>
      <EntityType Name=""BaseET"" BaseType=""NS.AbstractBaseET"">
        <Key>
          <PropertyRef Name=""EK0"" />
        </Key>
        <Property Name=""EK0"" Type=""Edm.Int32"" Nullable=""false"" />
        <Property Name=""EP1"" Type=""Edm.Int32"" Nullable=""false"" />
        <Property Name=""EAbsBaseCTP"" Type=""NS.AbstractBaseCT"" Nullable=""false"" />
        <Property Name=""EBaseCTP"" Type=""NS.BaseCT"" Nullable=""false"" />
        <Property Name=""EColOfAbsBaseCTP"" Type=""Collection(NS.AbstractBaseCT)"" Nullable=""false"" />
        <Property Name=""EColOfBaseCTP"" Type=""Collection(NS.BaseCT)"" Nullable=""false"" />
        <Property Name=""EColOfNullableAbsBaseCTP"" Type=""Collection(NS.AbstractBaseCT)"" />
        <Property Name=""EColOfNullableBaseCTP"" Type=""Collection(NS.BaseCT)"" />
        <Property Name=""EColOfEnum"" Type=""Collection(NS.EnumT)"" Nullable=""false"" />
        <Property Name=""ENullablePrimitive"" Type=""Edm.Int32"" />
      </EntityType>
      <EntityType Name=""ET"" BaseType=""NS.BaseET"" OpenType=""true"">
        <Property Name=""EP2"" Type=""Edm.Int32"" Nullable=""false"" />
        <Property Name=""EDerivedCTP"" Type=""NS.CT"" Nullable=""false"" />
        <Property Name=""EColOfDerivedCTP"" Type=""Collection(NS.CT)"" Nullable=""false"" />
        <Property Name=""EColOfNullableEnum"" Type=""Collection(NS.EnumT)"" />
      </EntityType>
      <Function Name=""BETRColOfAbsCT"" IsBound=""true"">
        <Parameter Name=""entity"" Type=""NS.BaseET"" Nullable=""false"" />
        <ReturnType Type=""Collection(NS.AbstractCT)"" Nullable=""false"" />
      </Function>
      <Function Name=""BETRColOfAbsBaseCT"" IsBound=""true"" IsComposable=""true"">
        <Parameter Name=""entity"" Type=""NS.BaseET"" Nullable=""false"" />
        <ReturnType Type=""Collection(NS.AbstractBaseCT)"" Nullable=""false"" />
      </Function>
      <Function Name=""BETRColOfBaseCT"" IsBound=""true"">
        <Parameter Name=""entity"" Type=""NS.ET"" Nullable=""false"" />
        <ReturnType Type=""Collection(NS.BaseCT)"" Nullable=""false"" />
      </Function>
      <Function Name=""BETRColOfDerivedCT"" IsBound=""true"" IsComposable=""true"">
        <Parameter Name=""entity"" Type=""NS.ET"" Nullable=""false"" />
        <ReturnType Type=""Collection(NS.CT)"" Nullable=""false"" />
      </Function>
      <Function Name=""BETRColOfNullableAbsCT"" IsBound=""true"">
        <Parameter Name=""entity"" Type=""NS.BaseET"" Nullable=""false"" />
        <ReturnType Type=""Collection(NS.AbstractCT)"" />
      </Function>
      <Function Name=""BETRColOfNullableBaseCT"" IsBound=""true"">
        <Parameter Name=""entity"" Type=""NS.ET"" Nullable=""false"" />
        <ReturnType Type=""Collection(NS.BaseCT)"" />
      </Function>
      <Function Name=""BETRColOfNullableInt"" IsBound=""true"">
        <Parameter Name=""entity"" Type=""NS.ET"" Nullable=""false"" />
        <ReturnType Type=""Collection(Edm.Int32)"" />
      </Function>
      <Function Name=""BETRColOfInt"" IsBound=""true"">
        <Parameter Name=""entity"" Type=""NS.ET"" Nullable=""false"" />
        <ReturnType Type=""Collection(Edm.Int32)"" Nullable=""false"" />
      </Function>
      <Function Name=""BETRColOfNullableEnum"" IsBound=""true"">
        <Parameter Name=""entity"" Type=""NS.ET"" Nullable=""false"" />
        <ReturnType Type=""Collection(NS.EnumT)"" />
      </Function>
      <Function Name=""BETRColOfEnum"" IsBound=""true"">
        <Parameter Name=""entity"" Type=""NS.BaseET"" Nullable=""false"" />
        <ReturnType Type=""Collection(NS.EnumT)"" Nullable=""false"" />
      </Function>
      <Function Name=""BETRNullableEnum"" IsBound=""true"">
        <Parameter Name=""entity"" Type=""NS.ET"" Nullable=""false"" />
        <ReturnType Type=""NS.EnumT"" />
      </Function>
      <Function Name=""RColOfAbsCT"">
        <ReturnType Type=""Collection(NS.AbstractCT)"" Nullable=""false"" />
      </Function>
      <Function Name=""RColOfAbsBaseCT"" IsComposable=""true"">
        <ReturnType Type=""Collection(NS.AbstractBaseCT)"" Nullable=""false"" />
      </Function>
      <Function Name=""RColOfBaseCT"">
        <ReturnType Type=""Collection(NS.BaseCT)"" Nullable=""false"" />
      </Function>
      <Function Name=""RColOfDerivedCT"" IsComposable=""true"">
        <ReturnType Type=""Collection(NS.CT)"" Nullable=""false"" />
      </Function>
      <Function Name=""RColOfNullableAbsCT"">
        <ReturnType Type=""Collection(NS.AbstractCT)"" />
      </Function>
      <Function Name=""RColOfNullableBaseCT"">
        <ReturnType Type=""Collection(NS.BaseCT)"" />
      </Function>
      <Function Name=""RColOfNullableInt"">
        <ReturnType Type=""Collection(Edm.Int32)"" />
      </Function>
      <Function Name=""RColOfInt"">
        <ReturnType Type=""Collection(Edm.Int32)"" Nullable=""false"" />
      </Function>
      <EntityContainer Name=""DefaultContainer"">
        <EntitySet Name=""AbstractETs"" EntityType=""NS.AbstractET"" />
        <EntitySet Name=""AbstractBaseETs"" EntityType=""NS.AbstractBaseET"" />
        <EntitySet Name=""BaseETs"" EntityType=""NS.BaseET"" />
        <EntitySet Name=""DerivedETs"" EntityType=""NS.ET"" />
        <FunctionImport Name=""RColOfAbsCT"" Function=""NS.RColOfAbsCT"" />
        <FunctionImport Name=""RColOfAbsBaseCT"" Function=""NS.RColOfAbsBaseCT"" />
        <FunctionImport Name=""RColOfBaseCT"" Function=""NS.RColOfBaseCT"" />
        <FunctionImport Name=""RColOfDerivedCT"" Function=""NS.RColOfDerivedCT"" />
        <FunctionImport Name=""RColOfNullableAbsCT"" Function=""NS.RColOfNullableAbsCT"" />
        <FunctionImport Name=""RColOfNullableBaseCT"" Function=""NS.RColOfNullableBaseCT"" />
        <FunctionImport Name=""RColOfNullableInt"" Function=""NS.RColOfNullableInt"" />
        <FunctionImport Name=""RColOfInt"" Function=""NS.RColOfInt"" />
      </EntityContainer>
    </Schema>
  </edmx:DataServices>
</edmx:Edmx>";
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
            public static global::Microsoft.OData.Edm.IEdmModel GetInstance()
            {
                return ParsedModel;
            }
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
            private static global::Microsoft.OData.Edm.IEdmModel LoadModelFromString()
            {
                global::System.Xml.XmlReader reader = CreateXmlReader(Edmx);
                try
                {
                    return global::Microsoft.OData.Edm.Csdl.CsdlReader.Parse(reader);
                }
                finally
                {
                    ((global::System.IDisposable)(reader)).Dispose();
                }
            }
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
            private static global::System.Xml.XmlReader CreateXmlReader(string edmxToParse)
            {
                return global::System.Xml.XmlReader.Create(new global::System.IO.StringReader(edmxToParse));
            }
        }
        /// <summary>
        /// There are no comments for RColOfAbsCT in the schema.
        /// </summary>
        public global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT> RColOfAbsCT()
        {
            return this.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT>("", "RColOfAbsCT", false);
        }
        /// <summary>
        /// There are no comments for RColOfAbsBaseCT in the schema.
        /// </summary>
        public global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseCT> RColOfAbsBaseCT()
        {
            return this.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseCT>("", "RColOfAbsBaseCT", true);
        }
        /// <summary>
        /// There are no comments for RColOfBaseCT in the schema.
        /// </summary>
        public global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT> RColOfBaseCT()
        {
            return this.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT>("", "RColOfBaseCT", false);
        }
        /// <summary>
        /// There are no comments for RColOfDerivedCT in the schema.
        /// </summary>
        public global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.CT> RColOfDerivedCT()
        {
            return this.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.CT>("", "RColOfDerivedCT", true);
        }
        /// <summary>
        /// There are no comments for RColOfNullableAbsCT in the schema.
        /// </summary>
        public global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT> RColOfNullableAbsCT()
        {
            return this.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT>("", "RColOfNullableAbsCT", false);
        }
        /// <summary>
        /// There are no comments for RColOfNullableBaseCT in the schema.
        /// </summary>
        public global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT> RColOfNullableBaseCT()
        {
            return this.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT>("", "RColOfNullableBaseCT", false);
        }
        /// <summary>
        /// There are no comments for RColOfNullableInt in the schema.
        /// </summary>
        public global::Microsoft.OData.Client.DataServiceQuery<global::System.Nullable<int>> RColOfNullableInt()
        {
            return this.CreateFunctionQuery<global::System.Nullable<int>>("", "RColOfNullableInt", false);
        }
        /// <summary>
        /// There are no comments for RColOfInt in the schema.
        /// </summary>
        public global::Microsoft.OData.Client.DataServiceQuery<int> RColOfInt()
        {
            return this.CreateFunctionQuery<int>("", "RColOfInt", false);
        }
    }
    /// <summary>
    /// There are no comments for AbstractCT in the schema.
    /// </summary>
    public abstract partial class AbstractCT : global::System.ComponentModel.INotifyPropertyChanged
    {
        /// <summary>
        /// This event is raised when the value of the property is changed
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        /// <summary>
        /// The value of the property is changed
        /// </summary>
        /// <param name="property">property name</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        protected virtual void OnPropertyChanged(string property)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property));
            }
        }
    }
    /// <summary>
    /// There are no comments for AbstractBaseCT in the schema.
    /// </summary>
    public abstract partial class AbstractBaseCT : AbstractCT
    {
        /// <summary>
        /// There are no comments for Property CP0 in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public int CP0
        {
            get
            {
                return this._CP0;
            }
            set
            {
                this.OnCP0Changing(value);
                this._CP0 = value;
                this.OnCP0Changed();
                this.OnPropertyChanged("CP0");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private int _CP0;
        partial void OnCP0Changing(int value);
        partial void OnCP0Changed();
    }
    /// <summary>
    /// There are no comments for BaseCT in the schema.
    /// </summary>
    public partial class BaseCT : AbstractBaseCT
    {
        /// <summary>
        /// Create a new BaseCT object.
        /// </summary>
        /// <param name="cP0">Initial value of CP0.</param>
        /// <param name="cP1">Initial value of CP1.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public static BaseCT CreateBaseCT(int cP0, int cP1)
        {
            BaseCT baseCT = new BaseCT();
            baseCT.CP0 = cP0;
            baseCT.CP1 = cP1;
            return baseCT;
        }
        /// <summary>
        /// There are no comments for Property CP1 in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public int CP1
        {
            get
            {
                return this._CP1;
            }
            set
            {
                this.OnCP1Changing(value);
                this._CP1 = value;
                this.OnCP1Changed();
                this.OnPropertyChanged("CP1");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private int _CP1;
        partial void OnCP1Changing(int value);
        partial void OnCP1Changed();
    }
    /// <summary>
    /// There are no comments for CT in the schema.
    /// </summary>
    public partial class CT : BaseCT
    {
        /// <summary>
        /// Create a new CT object.
        /// </summary>
        /// <param name="cP0">Initial value of CP0.</param>
        /// <param name="cP1">Initial value of CP1.</param>
        /// <param name="cP2">Initial value of CP2.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public static CT CreateCT(int cP0, int cP1, int cP2)
        {
            CT cT = new CT();
            cT.CP0 = cP0;
            cT.CP1 = cP1;
            cT.CP2 = cP2;
            return cT;
        }
        /// <summary>
        /// There are no comments for Property CP2 in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public int CP2
        {
            get
            {
                return this._CP2;
            }
            set
            {
                this.OnCP2Changing(value);
                this._CP2 = value;
                this.OnCP2Changed();
                this.OnPropertyChanged("CP2");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private int _CP2;
        partial void OnCP2Changing(int value);
        partial void OnCP2Changed();
    }
    /// <summary>
    /// There are no comments for AbstractETSingle in the schema.
    /// </summary>
    public partial class AbstractETSingle : global::Microsoft.OData.Client.DataServiceQuerySingle<AbstractET>
    {
        /// <summary>
        /// Initialize a new AbstractETSingle object.
        /// </summary>
        public AbstractETSingle(global::Microsoft.OData.Client.DataServiceContext context, string path)
            : base(context, path) { }

        /// <summary>
        /// Initialize a new AbstractETSingle object.
        /// </summary>
        public AbstractETSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable)
            : base(context, path, isComposable) { }

        /// <summary>
        /// Initialize a new AbstractETSingle object.
        /// </summary>
        public AbstractETSingle(global::Microsoft.OData.Client.DataServiceQuerySingle<AbstractET> query)
            : base(query) { }

    }
    /// <summary>
    /// There are no comments for AbstractET in the schema.
    /// </summary>
    [global::Microsoft.OData.Client.EntityType()]
    [global::Microsoft.OData.Client.EntitySet("AbstractETs")]
    public abstract partial class AbstractET : global::Microsoft.OData.Client.BaseEntityType, global::System.ComponentModel.INotifyPropertyChanged
    {
        /// <summary>
        /// This event is raised when the value of the property is changed
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        /// <summary>
        /// The value of the property is changed
        /// </summary>
        /// <param name="property">property name</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        protected virtual void OnPropertyChanged(string property)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property));
            }
        }
    }
    /// <summary>
    /// There are no comments for AbstractBaseETSingle in the schema.
    /// </summary>
    public partial class AbstractBaseETSingle : global::Microsoft.OData.Client.DataServiceQuerySingle<AbstractBaseET>
    {
        /// <summary>
        /// Initialize a new AbstractBaseETSingle object.
        /// </summary>
        public AbstractBaseETSingle(global::Microsoft.OData.Client.DataServiceContext context, string path)
            : base(context, path) { }

        /// <summary>
        /// Initialize a new AbstractBaseETSingle object.
        /// </summary>
        public AbstractBaseETSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable)
            : base(context, path, isComposable) { }

        /// <summary>
        /// Initialize a new AbstractBaseETSingle object.
        /// </summary>
        public AbstractBaseETSingle(global::Microsoft.OData.Client.DataServiceQuerySingle<AbstractBaseET> query)
            : base(query) { }

    }
    /// <summary>
    /// There are no comments for AbstractBaseET in the schema.
    /// </summary>
    [global::Microsoft.OData.Client.EntityType()]
    [global::Microsoft.OData.Client.EntitySet("AbstractBaseETs")]
    public abstract partial class AbstractBaseET : AbstractET
    {
        /// <summary>
        /// There are no comments for Property EP0 in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public int EP0
        {
            get
            {
                return this._EP0;
            }
            set
            {
                this.OnEP0Changing(value);
                this._EP0 = value;
                this.OnEP0Changed();
                this.OnPropertyChanged("EP0");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private int _EP0;
        partial void OnEP0Changing(int value);
        partial void OnEP0Changed();
        /// <summary>
        /// There are no comments for Property EAbsCTP in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT EAbsCTP
        {
            get
            {
                return this._EAbsCTP;
            }
            set
            {
                this.OnEAbsCTPChanging(value);
                this._EAbsCTP = value;
                this.OnEAbsCTPChanged();
                this.OnPropertyChanged("EAbsCTP");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT _EAbsCTP;
        partial void OnEAbsCTPChanging(global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT value);
        partial void OnEAbsCTPChanged();
        /// <summary>
        /// There are no comments for Property EColOfAbsCTP in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT> EColOfAbsCTP
        {
            get
            {
                return this._EColOfAbsCTP;
            }
            set
            {
                this.OnEColOfAbsCTPChanging(value);
                this._EColOfAbsCTP = value;
                this.OnEColOfAbsCTPChanged();
                this.OnPropertyChanged("EColOfAbsCTP");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT> _EColOfAbsCTP = new global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT>();
        partial void OnEColOfAbsCTPChanging(global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT> value);
        partial void OnEColOfAbsCTPChanged();
        /// <summary>
        /// There are no comments for Property EColOfNullableAbsCTP in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT> EColOfNullableAbsCTP
        {
            get
            {
                return this._EColOfNullableAbsCTP;
            }
            set
            {
                this.OnEColOfNullableAbsCTPChanging(value);
                this._EColOfNullableAbsCTP = value;
                this.OnEColOfNullableAbsCTPChanged();
                this.OnPropertyChanged("EColOfNullableAbsCTP");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT> _EColOfNullableAbsCTP = new global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT>();
        partial void OnEColOfNullableAbsCTPChanging(global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT> value);
        partial void OnEColOfNullableAbsCTPChanged();
        /// <summary>
        /// There are no comments for Property EColOfNullableInt in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::System.Collections.ObjectModel.ObservableCollection<global::System.Nullable<int>> EColOfNullableInt
        {
            get
            {
                return this._EColOfNullableInt;
            }
            set
            {
                this.OnEColOfNullableIntChanging(value);
                this._EColOfNullableInt = value;
                this.OnEColOfNullableIntChanged();
                this.OnPropertyChanged("EColOfNullableInt");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::System.Collections.ObjectModel.ObservableCollection<global::System.Nullable<int>> _EColOfNullableInt = new global::System.Collections.ObjectModel.ObservableCollection<global::System.Nullable<int>>();
        partial void OnEColOfNullableIntChanging(global::System.Collections.ObjectModel.ObservableCollection<global::System.Nullable<int>> value);
        partial void OnEColOfNullableIntChanged();
        /// <summary>
        /// There are no comments for Property EColOfInt in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::System.Collections.ObjectModel.ObservableCollection<int> EColOfInt
        {
            get
            {
                return this._EColOfInt;
            }
            set
            {
                this.OnEColOfIntChanging(value);
                this._EColOfInt = value;
                this.OnEColOfIntChanged();
                this.OnPropertyChanged("EColOfInt");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::System.Collections.ObjectModel.ObservableCollection<int> _EColOfInt = new global::System.Collections.ObjectModel.ObservableCollection<int>();
        partial void OnEColOfIntChanging(global::System.Collections.ObjectModel.ObservableCollection<int> value);
        partial void OnEColOfIntChanged();
        /// <summary>
        /// There are no comments for Property ENullableEnum in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::System.Nullable<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT> ENullableEnum
        {
            get
            {
                return this._ENullableEnum;
            }
            set
            {
                this.OnENullableEnumChanging(value);
                this._ENullableEnum = value;
                this.OnENullableEnumChanged();
                this.OnPropertyChanged("ENullableEnum");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::System.Nullable<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT> _ENullableEnum;
        partial void OnENullableEnumChanging(global::System.Nullable<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT> value);
        partial void OnENullableEnumChanged();
        /// <summary>
        /// There are no comments for Property ENullableAbsCTP in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT ENullableAbsCTP
        {
            get
            {
                return this._ENullableAbsCTP;
            }
            set
            {
                this.OnENullableAbsCTPChanging(value);
                this._ENullableAbsCTP = value;
                this.OnENullableAbsCTPChanged();
                this.OnPropertyChanged("ENullableAbsCTP");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT _ENullableAbsCTP;
        partial void OnENullableAbsCTPChanging(global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT value);
        partial void OnENullableAbsCTPChanged();
    }
    /// <summary>
    /// There are no comments for BaseETSingle in the schema.
    /// </summary>
    public partial class BaseETSingle : global::Microsoft.OData.Client.DataServiceQuerySingle<BaseET>
    {
        /// <summary>
        /// Initialize a new BaseETSingle object.
        /// </summary>
        public BaseETSingle(global::Microsoft.OData.Client.DataServiceContext context, string path)
            : base(context, path) { }

        /// <summary>
        /// Initialize a new BaseETSingle object.
        /// </summary>
        public BaseETSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable)
            : base(context, path, isComposable) { }

        /// <summary>
        /// Initialize a new BaseETSingle object.
        /// </summary>
        public BaseETSingle(global::Microsoft.OData.Client.DataServiceQuerySingle<BaseET> query)
            : base(query) { }

    }
    /// <summary>
    /// There are no comments for BaseET in the schema.
    /// </summary>
    /// <KeyProperties>
    /// EK0
    /// </KeyProperties>
    [global::Microsoft.OData.Client.Key("EK0")]
    [global::Microsoft.OData.Client.EntitySet("BaseETs")]
    public partial class BaseET : AbstractBaseET
    {
        /// <summary>
        /// Create a new BaseET object.
        /// </summary>
        /// <param name="eP0">Initial value of EP0.</param>
        /// <param name="eAbsCTP">Initial value of EAbsCTP.</param>
        /// <param name="eK0">Initial value of EK0.</param>
        /// <param name="eP1">Initial value of EP1.</param>
        /// <param name="eAbsBaseCTP">Initial value of EAbsBaseCTP.</param>
        /// <param name="eBaseCTP">Initial value of EBaseCTP.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public static BaseET CreateBaseET(int eP0,
                    global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT eAbsCTP,
                    int eK0,
                    int eP1,
                    global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseCT eAbsBaseCTP,
                    global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT eBaseCTP)
        {
            BaseET baseET = new BaseET();
            baseET.EP0 = eP0;
            if ((eAbsCTP == null))
            {
                throw new global::System.ArgumentNullException("eAbsCTP");
            }
            baseET.EAbsCTP = eAbsCTP;
            baseET.EK0 = eK0;
            baseET.EP1 = eP1;
            if ((eAbsBaseCTP == null))
            {
                throw new global::System.ArgumentNullException("eAbsBaseCTP");
            }
            baseET.EAbsBaseCTP = eAbsBaseCTP;
            if ((eBaseCTP == null))
            {
                throw new global::System.ArgumentNullException("eBaseCTP");
            }
            baseET.EBaseCTP = eBaseCTP;
            return baseET;
        }
        /// <summary>
        /// There are no comments for Property EK0 in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public int EK0
        {
            get
            {
                return this._EK0;
            }
            set
            {
                this.OnEK0Changing(value);
                this._EK0 = value;
                this.OnEK0Changed();
                this.OnPropertyChanged("EK0");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private int _EK0;
        partial void OnEK0Changing(int value);
        partial void OnEK0Changed();
        /// <summary>
        /// There are no comments for Property EP1 in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public int EP1
        {
            get
            {
                return this._EP1;
            }
            set
            {
                this.OnEP1Changing(value);
                this._EP1 = value;
                this.OnEP1Changed();
                this.OnPropertyChanged("EP1");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private int _EP1;
        partial void OnEP1Changing(int value);
        partial void OnEP1Changed();
        /// <summary>
        /// There are no comments for Property EAbsBaseCTP in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseCT EAbsBaseCTP
        {
            get
            {
                return this._EAbsBaseCTP;
            }
            set
            {
                this.OnEAbsBaseCTPChanging(value);
                this._EAbsBaseCTP = value;
                this.OnEAbsBaseCTPChanged();
                this.OnPropertyChanged("EAbsBaseCTP");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseCT _EAbsBaseCTP;
        partial void OnEAbsBaseCTPChanging(global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseCT value);
        partial void OnEAbsBaseCTPChanged();
        /// <summary>
        /// There are no comments for Property EBaseCTP in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT EBaseCTP
        {
            get
            {
                return this._EBaseCTP;
            }
            set
            {
                this.OnEBaseCTPChanging(value);
                this._EBaseCTP = value;
                this.OnEBaseCTPChanged();
                this.OnPropertyChanged("EBaseCTP");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT _EBaseCTP;
        partial void OnEBaseCTPChanging(global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT value);
        partial void OnEBaseCTPChanged();
        /// <summary>
        /// There are no comments for Property EColOfAbsBaseCTP in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseCT> EColOfAbsBaseCTP
        {
            get
            {
                return this._EColOfAbsBaseCTP;
            }
            set
            {
                this.OnEColOfAbsBaseCTPChanging(value);
                this._EColOfAbsBaseCTP = value;
                this.OnEColOfAbsBaseCTPChanged();
                this.OnPropertyChanged("EColOfAbsBaseCTP");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseCT> _EColOfAbsBaseCTP = new global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseCT>();
        partial void OnEColOfAbsBaseCTPChanging(global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseCT> value);
        partial void OnEColOfAbsBaseCTPChanged();
        /// <summary>
        /// There are no comments for Property EColOfBaseCTP in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT> EColOfBaseCTP
        {
            get
            {
                return this._EColOfBaseCTP;
            }
            set
            {
                this.OnEColOfBaseCTPChanging(value);
                this._EColOfBaseCTP = value;
                this.OnEColOfBaseCTPChanged();
                this.OnPropertyChanged("EColOfBaseCTP");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT> _EColOfBaseCTP = new global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT>();
        partial void OnEColOfBaseCTPChanging(global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT> value);
        partial void OnEColOfBaseCTPChanged();
        /// <summary>
        /// There are no comments for Property EColOfNullableAbsBaseCTP in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseCT> EColOfNullableAbsBaseCTP
        {
            get
            {
                return this._EColOfNullableAbsBaseCTP;
            }
            set
            {
                this.OnEColOfNullableAbsBaseCTPChanging(value);
                this._EColOfNullableAbsBaseCTP = value;
                this.OnEColOfNullableAbsBaseCTPChanged();
                this.OnPropertyChanged("EColOfNullableAbsBaseCTP");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseCT> _EColOfNullableAbsBaseCTP = new global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseCT>();
        partial void OnEColOfNullableAbsBaseCTPChanging(global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseCT> value);
        partial void OnEColOfNullableAbsBaseCTPChanged();
        /// <summary>
        /// There are no comments for Property EColOfNullableBaseCTP in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT> EColOfNullableBaseCTP
        {
            get
            {
                return this._EColOfNullableBaseCTP;
            }
            set
            {
                this.OnEColOfNullableBaseCTPChanging(value);
                this._EColOfNullableBaseCTP = value;
                this.OnEColOfNullableBaseCTPChanged();
                this.OnPropertyChanged("EColOfNullableBaseCTP");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT> _EColOfNullableBaseCTP = new global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT>();
        partial void OnEColOfNullableBaseCTPChanging(global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT> value);
        partial void OnEColOfNullableBaseCTPChanged();
        /// <summary>
        /// There are no comments for Property EColOfEnum in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT> EColOfEnum
        {
            get
            {
                return this._EColOfEnum;
            }
            set
            {
                this.OnEColOfEnumChanging(value);
                this._EColOfEnum = value;
                this.OnEColOfEnumChanged();
                this.OnPropertyChanged("EColOfEnum");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT> _EColOfEnum = new global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT>();
        partial void OnEColOfEnumChanging(global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT> value);
        partial void OnEColOfEnumChanged();
        /// <summary>
        /// There are no comments for Property ENullablePrimitive in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::System.Nullable<int> ENullablePrimitive
        {
            get
            {
                return this._ENullablePrimitive;
            }
            set
            {
                this.OnENullablePrimitiveChanging(value);
                this._ENullablePrimitive = value;
                this.OnENullablePrimitiveChanged();
                this.OnPropertyChanged("ENullablePrimitive");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::System.Nullable<int> _ENullablePrimitive;
        partial void OnENullablePrimitiveChanging(global::System.Nullable<int> value);
        partial void OnENullablePrimitiveChanged();
        /// <summary>
        /// There are no comments for BETRColOfAbsCT in the schema.
        /// </summary>
        public global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT> BETRColOfAbsCT()
        {
            global::System.Uri requestUri;
            Context.TryGetUri(this, out requestUri);
            return this.Context.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT>(string.Join("/", global::System.Linq.Enumerable.Select(global::System.Linq.Enumerable.Skip(requestUri.Segments, this.Context.BaseUri.Segments.Length), s => s.Trim('/'))), "NS.BETRColOfAbsCT", false);
        }
        /// <summary>
        /// There are no comments for BETRColOfAbsBaseCT in the schema.
        /// </summary>
        public global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseCT> BETRColOfAbsBaseCT()
        {
            global::System.Uri requestUri;
            Context.TryGetUri(this, out requestUri);
            return this.Context.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseCT>(string.Join("/", global::System.Linq.Enumerable.Select(global::System.Linq.Enumerable.Skip(requestUri.Segments, this.Context.BaseUri.Segments.Length), s => s.Trim('/'))), "NS.BETRColOfAbsBaseCT", true);
        }
        /// <summary>
        /// There are no comments for BETRColOfNullableAbsCT in the schema.
        /// </summary>
        public global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT> BETRColOfNullableAbsCT()
        {
            global::System.Uri requestUri;
            Context.TryGetUri(this, out requestUri);
            return this.Context.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT>(string.Join("/", global::System.Linq.Enumerable.Select(global::System.Linq.Enumerable.Skip(requestUri.Segments, this.Context.BaseUri.Segments.Length), s => s.Trim('/'))), "NS.BETRColOfNullableAbsCT", false);
        }
        /// <summary>
        /// There are no comments for BETRColOfEnum in the schema.
        /// </summary>
        public global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT> BETRColOfEnum()
        {
            global::System.Uri requestUri;
            Context.TryGetUri(this, out requestUri);
            return this.Context.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT>(string.Join("/", global::System.Linq.Enumerable.Select(global::System.Linq.Enumerable.Skip(requestUri.Segments, this.Context.BaseUri.Segments.Length), s => s.Trim('/'))), "NS.BETRColOfEnum", false);
        }
    }
    /// <summary>
    /// There are no comments for ETSingle in the schema.
    /// </summary>
    public partial class ETSingle : global::Microsoft.OData.Client.DataServiceQuerySingle<ET>
    {
        /// <summary>
        /// Initialize a new ETSingle object.
        /// </summary>
        public ETSingle(global::Microsoft.OData.Client.DataServiceContext context, string path)
            : base(context, path) { }

        /// <summary>
        /// Initialize a new ETSingle object.
        /// </summary>
        public ETSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable)
            : base(context, path, isComposable) { }

        /// <summary>
        /// Initialize a new ETSingle object.
        /// </summary>
        public ETSingle(global::Microsoft.OData.Client.DataServiceQuerySingle<ET> query)
            : base(query) { }

    }
    /// <summary>
    /// There are no comments for ET in the schema.
    /// </summary>
    /// <KeyProperties>
    /// EK0
    /// </KeyProperties>
    [global::Microsoft.OData.Client.Key("EK0")]
    [global::Microsoft.OData.Client.EntitySet("DerivedETs")]
    public partial class ET : BaseET
    {
        /// <summary>
        /// Create a new ET object.
        /// </summary>
        /// <param name="eP0">Initial value of EP0.</param>
        /// <param name="eAbsCTP">Initial value of EAbsCTP.</param>
        /// <param name="eK0">Initial value of EK0.</param>
        /// <param name="eP1">Initial value of EP1.</param>
        /// <param name="eAbsBaseCTP">Initial value of EAbsBaseCTP.</param>
        /// <param name="eBaseCTP">Initial value of EBaseCTP.</param>
        /// <param name="eP2">Initial value of EP2.</param>
        /// <param name="eDerivedCTP">Initial value of EDerivedCTP.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public static ET CreateET(int eP0,
                    global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT eAbsCTP,
                    int eK0,
                    int eP1,
                    global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseCT eAbsBaseCTP,
                    global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT eBaseCTP,
                    int eP2,
                    global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.CT eDerivedCTP)
        {
            ET eT = new ET();
            eT.EP0 = eP0;
            if ((eAbsCTP == null))
            {
                throw new global::System.ArgumentNullException("eAbsCTP");
            }
            eT.EAbsCTP = eAbsCTP;
            eT.EK0 = eK0;
            eT.EP1 = eP1;
            if ((eAbsBaseCTP == null))
            {
                throw new global::System.ArgumentNullException("eAbsBaseCTP");
            }
            eT.EAbsBaseCTP = eAbsBaseCTP;
            if ((eBaseCTP == null))
            {
                throw new global::System.ArgumentNullException("eBaseCTP");
            }
            eT.EBaseCTP = eBaseCTP;
            eT.EP2 = eP2;
            if ((eDerivedCTP == null))
            {
                throw new global::System.ArgumentNullException("eDerivedCTP");
            }
            eT.EDerivedCTP = eDerivedCTP;
            return eT;
        }
        /// <summary>
        /// There are no comments for Property EP2 in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public int EP2
        {
            get
            {
                return this._EP2;
            }
            set
            {
                this.OnEP2Changing(value);
                this._EP2 = value;
                this.OnEP2Changed();
                this.OnPropertyChanged("EP2");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private int _EP2;
        partial void OnEP2Changing(int value);
        partial void OnEP2Changed();
        /// <summary>
        /// There are no comments for Property EDerivedCTP in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.CT EDerivedCTP
        {
            get
            {
                return this._EDerivedCTP;
            }
            set
            {
                this.OnEDerivedCTPChanging(value);
                this._EDerivedCTP = value;
                this.OnEDerivedCTPChanged();
                this.OnPropertyChanged("EDerivedCTP");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.CT _EDerivedCTP;
        partial void OnEDerivedCTPChanging(global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.CT value);
        partial void OnEDerivedCTPChanged();
        /// <summary>
        /// There are no comments for Property EColOfDerivedCTP in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.CT> EColOfDerivedCTP
        {
            get
            {
                return this._EColOfDerivedCTP;
            }
            set
            {
                this.OnEColOfDerivedCTPChanging(value);
                this._EColOfDerivedCTP = value;
                this.OnEColOfDerivedCTPChanged();
                this.OnPropertyChanged("EColOfDerivedCTP");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.CT> _EColOfDerivedCTP = new global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.CT>();
        partial void OnEColOfDerivedCTPChanging(global::System.Collections.ObjectModel.ObservableCollection<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.CT> value);
        partial void OnEColOfDerivedCTPChanged();
        /// <summary>
        /// There are no comments for Property EColOfNullableEnum in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        public global::System.Collections.ObjectModel.ObservableCollection<global::System.Nullable<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT>> EColOfNullableEnum
        {
            get
            {
                return this._EColOfNullableEnum;
            }
            set
            {
                this.OnEColOfNullableEnumChanging(value);
                this._EColOfNullableEnum = value;
                this.OnEColOfNullableEnumChanged();
                this.OnPropertyChanged("EColOfNullableEnum");
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
        private global::System.Collections.ObjectModel.ObservableCollection<global::System.Nullable<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT>> _EColOfNullableEnum = new global::System.Collections.ObjectModel.ObservableCollection<global::System.Nullable<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT>>();
        partial void OnEColOfNullableEnumChanging(global::System.Collections.ObjectModel.ObservableCollection<global::System.Nullable<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT>> value);
        partial void OnEColOfNullableEnumChanged();
        /// <summary>
        /// There are no comments for BETRColOfBaseCT in the schema.
        /// </summary>
        public global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT> BETRColOfBaseCT()
        {
            global::System.Uri requestUri;
            Context.TryGetUri(this, out requestUri);
            return this.Context.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT>(string.Join("/", global::System.Linq.Enumerable.Select(global::System.Linq.Enumerable.Skip(requestUri.Segments, this.Context.BaseUri.Segments.Length), s => s.Trim('/'))), "NS.BETRColOfBaseCT", false);
        }
        /// <summary>
        /// There are no comments for BETRColOfDerivedCT in the schema.
        /// </summary>
        public global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.CT> BETRColOfDerivedCT()
        {
            global::System.Uri requestUri;
            Context.TryGetUri(this, out requestUri);
            return this.Context.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.CT>(string.Join("/", global::System.Linq.Enumerable.Select(global::System.Linq.Enumerable.Skip(requestUri.Segments, this.Context.BaseUri.Segments.Length), s => s.Trim('/'))), "NS.BETRColOfDerivedCT", true);
        }
        /// <summary>
        /// There are no comments for BETRColOfNullableBaseCT in the schema.
        /// </summary>
        public global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT> BETRColOfNullableBaseCT()
        {
            global::System.Uri requestUri;
            Context.TryGetUri(this, out requestUri);
            return this.Context.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT>(string.Join("/", global::System.Linq.Enumerable.Select(global::System.Linq.Enumerable.Skip(requestUri.Segments, this.Context.BaseUri.Segments.Length), s => s.Trim('/'))), "NS.BETRColOfNullableBaseCT", false);
        }
        /// <summary>
        /// There are no comments for BETRColOfNullableInt in the schema.
        /// </summary>
        public global::Microsoft.OData.Client.DataServiceQuery<global::System.Nullable<int>> BETRColOfNullableInt()
        {
            global::System.Uri requestUri;
            Context.TryGetUri(this, out requestUri);
            return this.Context.CreateFunctionQuery<global::System.Nullable<int>>(string.Join("/", global::System.Linq.Enumerable.Select(global::System.Linq.Enumerable.Skip(requestUri.Segments, this.Context.BaseUri.Segments.Length), s => s.Trim('/'))), "NS.BETRColOfNullableInt", false);
        }
        /// <summary>
        /// There are no comments for BETRColOfInt in the schema.
        /// </summary>
        public global::Microsoft.OData.Client.DataServiceQuery<int> BETRColOfInt()
        {
            global::System.Uri requestUri;
            Context.TryGetUri(this, out requestUri);
            return this.Context.CreateFunctionQuery<int>(string.Join("/", global::System.Linq.Enumerable.Select(global::System.Linq.Enumerable.Skip(requestUri.Segments, this.Context.BaseUri.Segments.Length), s => s.Trim('/'))), "NS.BETRColOfInt", false);
        }
        /// <summary>
        /// There are no comments for BETRColOfNullableEnum in the schema.
        /// </summary>
        public global::Microsoft.OData.Client.DataServiceQuery<global::System.Nullable<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT>> BETRColOfNullableEnum()
        {
            global::System.Uri requestUri;
            Context.TryGetUri(this, out requestUri);
            return this.Context.CreateFunctionQuery<global::System.Nullable<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT>>(string.Join("/", global::System.Linq.Enumerable.Select(global::System.Linq.Enumerable.Skip(requestUri.Segments, this.Context.BaseUri.Segments.Length), s => s.Trim('/'))), "NS.BETRColOfNullableEnum", false);
        }
        /// <summary>
        /// There are no comments for BETRNullableEnum in the schema.
        /// </summary>
        public global::Microsoft.OData.Client.DataServiceQuerySingle<global::System.Nullable<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT>> BETRNullableEnum()
        {
            global::System.Uri requestUri;
            Context.TryGetUri(this, out requestUri);

            return this.Context.CreateFunctionQuerySingle<global::System.Nullable<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT>>(string.Join("/", global::System.Linq.Enumerable.Select(global::System.Linq.Enumerable.Skip(requestUri.Segments, this.Context.BaseUri.Segments.Length), s => s.Trim('/'))), "NS.BETRNullableEnum", false);
        }
    }
    /// <summary>
    /// There are no comments for EnumT in the schema.
    /// </summary>
    public enum EnumT
    {
        EnumP1 = 0,
        EnumP2 = 1,
        EnumP3 = 2
    }
    /// <summary>
    /// Class containing all extension methods
    /// </summary>
    public static class ExtensionMethods
    {
        /// <summary>
        /// Cast an entity of type global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractET to its derived type global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseET
        /// </summary>
        /// <param name="source">source entity</param>
        public static global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseETSingle CastToAbstractBaseET(this global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractET> source)
        {
            global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseET> query = source.CastTo<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseET>();
            return new global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseETSingle(source.Context, query.GetPath(null));
        }
        /// <summary>
        /// Get an entity of type global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseET as global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseETSingle specified by key from an entity set
        /// </summary>
        /// <param name="source">source entity set</param>
        /// <param name="keys">dictionary with the names and values of keys</param>
        public static global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseETSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseET> source, global::System.Collections.Generic.Dictionary<string, object> keys)
        {
            return new global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseETSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys)));
        }
        /// <summary>
        /// Get an entity of type global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseET as global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseETSingle specified by key from an entity set
        /// </summary>
        /// <param name="source">source entity set</param>
        /// <param name="eK0">The value of eK0</param>
        public static global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseETSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseET> source,
            int eK0)
        {
            global::System.Collections.Generic.Dictionary<string, object> keys = new global::System.Collections.Generic.Dictionary<string, object>
            {
                { "EK0", eK0 }
            };
            return new global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseETSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys)));
        }
        /// <summary>
        /// Cast an entity of type global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseET to its derived type global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseET
        /// </summary>
        /// <param name="source">source entity</param>
        public static global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseETSingle CastToBaseET(this global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseET> source)
        {
            global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseET> query = source.CastTo<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseET>();
            return new global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseETSingle(source.Context, query.GetPath(null));
        }
        /// <summary>
        /// Cast an entity of type global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractET to its derived type global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseET
        /// </summary>
        /// <param name="source">source entity</param>
        public static global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseETSingle CastToBaseET(this global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractET> source)
        {
            global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseET> query = source.CastTo<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseET>();
            return new global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseETSingle(source.Context, query.GetPath(null));
        }
        /// <summary>
        /// Get an entity of type global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET as global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ETSingle specified by key from an entity set
        /// </summary>
        /// <param name="source">source entity set</param>
        /// <param name="keys">dictionary with the names and values of keys</param>
        public static global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ETSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET> source, global::System.Collections.Generic.Dictionary<string, object> keys)
        {
            return new global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ETSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys)));
        }
        /// <summary>
        /// Get an entity of type global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET as global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ETSingle specified by key from an entity set
        /// </summary>
        /// <param name="source">source entity set</param>
        /// <param name="eK0">The value of eK0</param>
        public static global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ETSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET> source,
            int eK0)
        {
            global::System.Collections.Generic.Dictionary<string, object> keys = new global::System.Collections.Generic.Dictionary<string, object>
            {
                { "EK0", eK0 }
            };
            return new global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ETSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys)));
        }
        /// <summary>
        /// Cast an entity of type global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseET to its derived type global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET
        /// </summary>
        /// <param name="source">source entity</param>
        public static global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ETSingle CastToET(this global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseET> source)
        {
            global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET> query = source.CastTo<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET>();
            return new global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ETSingle(source.Context, query.GetPath(null));
        }
        /// <summary>
        /// Cast an entity of type global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseET to its derived type global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET
        /// </summary>
        /// <param name="source">source entity</param>
        public static global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ETSingle CastToET(this global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseET> source)
        {
            global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET> query = source.CastTo<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET>();
            return new global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ETSingle(source.Context, query.GetPath(null));
        }
        /// <summary>
        /// Cast an entity of type global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractET to its derived type global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET
        /// </summary>
        /// <param name="source">source entity</param>
        public static global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ETSingle CastToET(this global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractET> source)
        {
            global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET> query = source.CastTo<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET>();
            return new global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ETSingle(source.Context, query.GetPath(null));
        }
        /// <summary>
        /// There are no comments for BETRColOfAbsCT in the schema.
        /// </summary>
        public static global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT> BETRColOfAbsCT(this global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseET> source)
        {
            if (!source.IsComposable)
            {
                throw new global::System.NotSupportedException("The previous function is not composable.");
            }

            return source.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT>("NS.BETRColOfAbsCT", false);
        }
        /// <summary>
        /// There are no comments for BETRColOfAbsCT in the schema.
        /// </summary>
        public static global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT> BETRColOfAbsCT(this global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET> source)
        {
            if (!source.IsComposable)
            {
                throw new global::System.NotSupportedException("The previous function is not composable.");
            }

            return source.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT>("NS.BETRColOfAbsCT", false);
        }
        /// <summary>
        /// There are no comments for BETRColOfAbsBaseCT in the schema.
        /// </summary>
        public static global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseCT> BETRColOfAbsBaseCT(this global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseET> source)
        {
            if (!source.IsComposable)
            {
                throw new global::System.NotSupportedException("The previous function is not composable.");
            }

            return source.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseCT>("NS.BETRColOfAbsBaseCT", true);
        }
        /// <summary>
        /// There are no comments for BETRColOfAbsBaseCT in the schema.
        /// </summary>
        public static global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseCT> BETRColOfAbsBaseCT(this global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET> source)
        {
            if (!source.IsComposable)
            {
                throw new global::System.NotSupportedException("The previous function is not composable.");
            }

            return source.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractBaseCT>("NS.BETRColOfAbsBaseCT", true);
        }
        /// <summary>
        /// There are no comments for BETRColOfBaseCT in the schema.
        /// </summary>
        public static global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT> BETRColOfBaseCT(this global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET> source)
        {
            if (!source.IsComposable)
            {
                throw new global::System.NotSupportedException("The previous function is not composable.");
            }

            return source.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT>("NS.BETRColOfBaseCT", false);
        }
        /// <summary>
        /// There are no comments for BETRColOfDerivedCT in the schema.
        /// </summary>
        public static global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.CT> BETRColOfDerivedCT(this global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET> source)
        {
            if (!source.IsComposable)
            {
                throw new global::System.NotSupportedException("The previous function is not composable.");
            }

            return source.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.CT>("NS.BETRColOfDerivedCT", true);
        }
        /// <summary>
        /// There are no comments for BETRColOfNullableAbsCT in the schema.
        /// </summary>
        public static global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT> BETRColOfNullableAbsCT(this global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseET> source)
        {
            if (!source.IsComposable)
            {
                throw new global::System.NotSupportedException("The previous function is not composable.");
            }

            return source.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT>("NS.BETRColOfNullableAbsCT", false);
        }
        /// <summary>
        /// There are no comments for BETRColOfNullableAbsCT in the schema.
        /// </summary>
        public static global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT> BETRColOfNullableAbsCT(this global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET> source)
        {
            if (!source.IsComposable)
            {
                throw new global::System.NotSupportedException("The previous function is not composable.");
            }

            return source.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.AbstractCT>("NS.BETRColOfNullableAbsCT", false);
        }
        /// <summary>
        /// There are no comments for BETRColOfNullableBaseCT in the schema.
        /// </summary>
        public static global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT> BETRColOfNullableBaseCT(this global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET> source)
        {
            if (!source.IsComposable)
            {
                throw new global::System.NotSupportedException("The previous function is not composable.");
            }

            return source.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseCT>("NS.BETRColOfNullableBaseCT", false);
        }
        /// <summary>
        /// There are no comments for BETRColOfNullableInt in the schema.
        /// </summary>
        public static global::Microsoft.OData.Client.DataServiceQuery<global::System.Nullable<int>> BETRColOfNullableInt(this global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET> source)
        {
            if (!source.IsComposable)
            {
                throw new global::System.NotSupportedException("The previous function is not composable.");
            }

            return source.CreateFunctionQuery<global::System.Nullable<int>>("NS.BETRColOfNullableInt", false);
        }
        /// <summary>
        /// There are no comments for BETRColOfInt in the schema.
        /// </summary>
        public static global::Microsoft.OData.Client.DataServiceQuery<int> BETRColOfInt(this global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET> source)
        {
            if (!source.IsComposable)
            {
                throw new global::System.NotSupportedException("The previous function is not composable.");
            }

            return source.CreateFunctionQuery<int>("NS.BETRColOfInt", false);
        }
        /// <summary>
        /// There are no comments for BETRColOfNullableEnum in the schema.
        /// </summary>
        public static global::Microsoft.OData.Client.DataServiceQuery<global::System.Nullable<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT>> BETRColOfNullableEnum(this global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET> source)
        {
            if (!source.IsComposable)
            {
                throw new global::System.NotSupportedException("The previous function is not composable.");
            }

            return source.CreateFunctionQuery<global::System.Nullable<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT>>("NS.BETRColOfNullableEnum", false);
        }
        /// <summary>
        /// There are no comments for BETRColOfEnum in the schema.
        /// </summary>
        public static global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT> BETRColOfEnum(this global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.BaseET> source)
        {
            if (!source.IsComposable)
            {
                throw new global::System.NotSupportedException("The previous function is not composable.");
            }

            return source.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT>("NS.BETRColOfEnum", false);
        }
        /// <summary>
        /// There are no comments for BETRColOfEnum in the schema.
        /// </summary>
        public static global::Microsoft.OData.Client.DataServiceQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT> BETRColOfEnum(this global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET> source)
        {
            if (!source.IsComposable)
            {
                throw new global::System.NotSupportedException("The previous function is not composable.");
            }

            return source.CreateFunctionQuery<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT>("NS.BETRColOfEnum", false);
        }
        /// <summary>
        /// There are no comments for BETRNullableEnum in the schema.
        /// </summary>
        public static global::Microsoft.OData.Client.DataServiceQuerySingle<global::System.Nullable<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT>> BETRNullableEnum(this global::Microsoft.OData.Client.DataServiceQuerySingle<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.ET> source)
        {
            if (!source.IsComposable)
            {
                throw new global::System.NotSupportedException("The previous function is not composable.");
            }

            return source.CreateFunctionQuerySingle<global::System.Nullable<global::Microsoft.OData.Client.TDDUnitTests.Tests.Materialization.EnumT>>("NS.BETRNullableEnum", false);
        }
    }
}
