From b83c4c86a4a4db60c9b6fd54f56de13c345a7d18 Mon Sep 17 00:00:00 2001 From: Vincent He Date: Fri, 5 Aug 2016 15:41:51 +0800 Subject: [PATCH] Add computed and immutable annotation support --- src/GlobalSuppressions.cs | 4 + .../Submit/ChangeSetInitializer.cs | 3 +- .../Extensions.cs | 96 +- .../Microsoft.Restier.Publishers.OData.csproj | 1 + .../Model/PropertyAttributes.cs | 28 + .../RestierController.cs | 16 +- .../DefaultDataStoreManager.cs | 13 +- .../ServiceReference/TrippinProxy.cs | 5107 ++++++++++++----- .../TrippinE2ETestCases.cs | 120 +- .../Api/TrippinApi.cs | 28 +- ...rosoft.OData.Service.Sample.Trippin.csproj | 1 + .../Models/Order.cs | 21 + .../Models/OrderDetail.cs | 23 + .../Models/TrippinModel.cs | 20 +- 14 files changed, 4119 insertions(+), 1362 deletions(-) create mode 100644 src/Microsoft.Restier.Publishers.OData/Model/PropertyAttributes.cs create mode 100644 test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Models/OrderDetail.cs diff --git a/src/GlobalSuppressions.cs b/src/GlobalSuppressions.cs index dfdce66d..f4741ddc 100644 --- a/src/GlobalSuppressions.cs +++ b/src/GlobalSuppressions.cs @@ -114,6 +114,10 @@ [assembly: SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Microsoft.Restier.Publishers.OData.Model.RestierModelExtender+ModelMapper.#InnerModelMapper")] [assembly: SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Microsoft.Restier.Publishers.OData.BaseResult.#EdmType")] [assembly: SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Microsoft.Restier.Publishers.OData.BaseResult.#Context")] +[assembly: SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Microsoft.Restier.Publishers.OData.PropertyAttributes.#NoWritePermission")] +[assembly: SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Microsoft.Restier.Publishers.OData.PropertyAttributes.#NoReadPermission")] +[assembly: SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Microsoft.Restier.Publishers.OData.PropertyAttributes.#NoReadPermission")] +[assembly: SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Microsoft.Restier.Publishers.OData.PropertyAttributes.#NoWritePermission")] [assembly: SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "System.Ensure.#NotNull`1(System.Nullable`1,System.String)")] [assembly: SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "System.Linq.Expressions.ExpressionHelperMethods.#EnumerableCastGeneric")] [assembly: SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "System.Linq.Expressions.ExpressionHelperMethods.#EnumerableToListGeneric")] diff --git a/src/Microsoft.Restier.Providers.EntityFramework/Submit/ChangeSetInitializer.cs b/src/Microsoft.Restier.Providers.EntityFramework/Submit/ChangeSetInitializer.cs index 6eb0da76..61585a40 100644 --- a/src/Microsoft.Restier.Providers.EntityFramework/Submit/ChangeSetInitializer.cs +++ b/src/Microsoft.Restier.Providers.EntityFramework/Submit/ChangeSetInitializer.cs @@ -45,6 +45,7 @@ public async Task InitializeAsync( // This means request resource is sub type of resource type if (entry.ActualResourceType != null && resourceType != entry.ActualResourceType) { + // Set type to derived type resourceType = entry.ActualResourceType; } @@ -55,9 +56,7 @@ public async Task InitializeAsync( if (entry.DataModificationItemAction == DataModificationItemAction.Insert) { resource = set.Create(); - SetValues(resource, resourceType, entry.LocalValues); - set.Add(resource); } else if (entry.DataModificationItemAction == DataModificationItemAction.Remove) diff --git a/src/Microsoft.Restier.Publishers.OData/Extensions.cs b/src/Microsoft.Restier.Publishers.OData/Extensions.cs index ebc0eebd..231650f3 100644 --- a/src/Microsoft.Restier.Publishers.OData/Extensions.cs +++ b/src/Microsoft.Restier.Publishers.OData/Extensions.cs @@ -13,6 +13,8 @@ using Microsoft.OData.Edm; using Microsoft.OData.Edm.Annotations; using Microsoft.OData.Edm.Library; +using Microsoft.OData.Edm.Library.Annotations; +using Microsoft.OData.Edm.Library.Values; using Microsoft.OData.Edm.Vocabularies.V1; using Microsoft.Restier.Core; using Microsoft.Restier.Publishers.OData.Model; @@ -29,6 +31,10 @@ internal static class Extensions private static ConcurrentDictionary concurrencyCheckFlags = new ConcurrentDictionary(); + private static ConcurrentDictionary> + typePropertiesAttributes + = new ConcurrentDictionary>(); + public static void ApplyTo(this ETag etag, IDictionary propertyValues) { if (etag != null) @@ -63,18 +69,31 @@ public static bool IsConcurrencyCheckEnabled(this IEdmModel model, IEdmEntitySet return needCurrencyCheck; } - public static IReadOnlyDictionary CreatePropertyDictionary(this Delta entity) + public static IReadOnlyDictionary CreatePropertyDictionary( + this Delta entity, IEdmStructuredType edmType, ApiBase api, bool isCreation) { + var propertiesAttributes = RetrievePropertiesAttributes(edmType, api); + Dictionary propertyValues = new Dictionary(); foreach (string propertyName in entity.GetChangedPropertyNames()) { + PropertyAttributes attributes; + if (propertiesAttributes != null && propertiesAttributes.TryGetValue(propertyName, out attributes)) + { + if ((isCreation && attributes.IgnoreForCreation) || (!isCreation && attributes.IgnoreForUpdate)) + { + // Will not get the properties for update or creation + continue; + } + } + object value; if (entity.TryGetPropertyValue(propertyName, out value)) { var complexObj = value as EdmComplexObject; if (complexObj != null) { - value = CreatePropertyDictionary(complexObj); + value = CreatePropertyDictionary(complexObj, complexObj.ActualEdmType, api, isCreation); } propertyValues.Add(propertyName, value); @@ -84,6 +103,79 @@ public static IReadOnlyDictionary CreatePropertyDictionary(this return propertyValues; } + public static IDictionary RetrievePropertiesAttributes( + IEdmStructuredType edmType, ApiBase api) + { + IDictionary propertiesAttributes; + if (typePropertiesAttributes.TryGetValue(edmType, out propertiesAttributes)) + { + return propertiesAttributes; + } + + var model = api.Context.GetModelAsync().Result; + foreach (var property in edmType.DeclaredProperties) + { + var annotations = model.FindVocabularyAnnotations(property); + PropertyAttributes attributes = null; + foreach (var annotation in annotations) + { + var valueAnnotation = annotation as EdmAnnotation; + if (valueAnnotation == null) + { + continue; + } + + if (valueAnnotation.Term.Namespace == CoreVocabularyModel.ImmutableTerm.Namespace + && valueAnnotation.Term.Name == CoreVocabularyModel.ImmutableTerm.Name) + { + var value = valueAnnotation.Value as EdmBooleanConstant; + if (value != null && value.Value) + { + if (attributes == null) + { + attributes = new PropertyAttributes(); + } + + attributes.IgnoreForUpdate = true; + } + } + + if (valueAnnotation.Term.Namespace == CoreVocabularyModel.ComputedTerm.Namespace + && valueAnnotation.Term.Name == CoreVocabularyModel.ComputedTerm.Name) + { + var value = valueAnnotation.Value as EdmBooleanConstant; + if (value != null && value.Value) + { + if (attributes == null) + { + attributes = new PropertyAttributes(); + } + + attributes.IgnoreForUpdate = true; + attributes.IgnoreForCreation = true; + } + } + + // TODO add permission annotation check + // CoreVocabularyModel has no permission yet, will add with #480 + } + + // Add property attributes to the dictionary + if (attributes != null) + { + if (propertiesAttributes == null) + { + propertiesAttributes = new Dictionary(); + typePropertiesAttributes[edmType] = propertiesAttributes; + } + + propertiesAttributes.Add(property.Name, attributes); + } + } + + return propertiesAttributes; + } + public static Type GetClrType(this IEdmType edmType, ApiBase api) { IEdmModel edmModel = api.GetModelAsync().Result; diff --git a/src/Microsoft.Restier.Publishers.OData/Microsoft.Restier.Publishers.OData.csproj b/src/Microsoft.Restier.Publishers.OData/Microsoft.Restier.Publishers.OData.csproj index 549505ff..0e3a6d0d 100644 --- a/src/Microsoft.Restier.Publishers.OData/Microsoft.Restier.Publishers.OData.csproj +++ b/src/Microsoft.Restier.Publishers.OData/Microsoft.Restier.Publishers.OData.csproj @@ -90,6 +90,7 @@ + diff --git a/src/Microsoft.Restier.Publishers.OData/Model/PropertyAttributes.cs b/src/Microsoft.Restier.Publishers.OData/Model/PropertyAttributes.cs new file mode 100644 index 00000000..bfc14f0f --- /dev/null +++ b/src/Microsoft.Restier.Publishers.OData/Model/PropertyAttributes.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +namespace Microsoft.Restier.Publishers.OData +{ + internal class PropertyAttributes + { + /// + /// Gets or sets a value indicating whether the property should be ignored during update + /// + public bool IgnoreForUpdate { get; set; } + + /// + /// Gets or sets a value indicating whether the property should be ignored during creation + /// + public bool IgnoreForCreation { get; set; } + + /// + /// Gets or sets a value indicating whether there is permission to read the property + /// + public bool NoReadPermission { get; set; } + + /// + /// Gets or sets a value indicating whether there is permission to write the property + /// + public bool NoWritePermission { get; set; } + } +} diff --git a/src/Microsoft.Restier.Publishers.OData/RestierController.cs b/src/Microsoft.Restier.Publishers.OData/RestierController.cs index 38ebec89..c6b17334 100644 --- a/src/Microsoft.Restier.Publishers.OData/RestierController.cs +++ b/src/Microsoft.Restier.Publishers.OData/RestierController.cs @@ -149,7 +149,7 @@ public async Task Post(EdmEntityObject edmEntityObject, Cance // In case of type inheritance, the actual type will be different from entity type var expectedEntityType = path.EdmType; - var actualEntityType = path.EdmType; + var actualEntityType = path.EdmType as IEdmStructuredType; if (edmEntityObject.ActualEdmType != null) { expectedEntityType = edmEntityObject.ExpectedEdmType; @@ -163,7 +163,7 @@ public async Task Post(EdmEntityObject edmEntityObject, Cance DataModificationItemAction.Insert, null, null, - edmEntityObject.CreatePropertyDictionary()); + edmEntityObject.CreatePropertyDictionary(actualEntityType, api, true)); RestierChangeSetProperty changeSetProperty = this.Request.GetChangeSet(); if (changeSetProperty == null) @@ -384,13 +384,17 @@ private async Task Update( var propertiesInEtag = await this.GetOriginalValues(entitySet); if (propertiesInEtag == null) { - throw new PreconditionRequiredException(Resources.PreconditionRequired); + throw new PreconditionRequiredException(Resources.PreconditionRequired); } // In case of type inheritance, the actual type will be different from entity type - // This is only needed for put case, and does not for patch case + // This is only needed for put case, and does not need for patch case + // For put request, it will create a new, blank instance of the entity. + // copy over the key values and set any updated values from the client on the new instance. + // Then apply all the properties of the new instance to the instance to be updated. + // This will set any unspecified properties to their default value. var expectedEntityType = path.EdmType; - var actualEntityType = path.EdmType; + var actualEntityType = path.EdmType as IEdmStructuredType; if (edmEntityObject.ActualEdmType != null) { expectedEntityType = edmEntityObject.ExpectedEdmType; @@ -404,7 +408,7 @@ private async Task Update( DataModificationItemAction.Update, RestierQueryBuilder.GetPathKeyValues(path), propertiesInEtag, - edmEntityObject.CreatePropertyDictionary()); + edmEntityObject.CreatePropertyDictionary(actualEntityType, api, false)); updateItem.IsFullReplaceUpdateRequest = isFullReplaceUpdate; RestierChangeSetProperty changeSetProperty = this.Request.GetChangeSet(); diff --git a/test/ODataEndToEnd/Microsoft.OData.Service.Library/DataStoreManager/DefaultDataStoreManager.cs b/test/ODataEndToEnd/Microsoft.OData.Service.Library/DataStoreManager/DefaultDataStoreManager.cs index 14249bb3..a4e50dc1 100644 --- a/test/ODataEndToEnd/Microsoft.OData.Service.Library/DataStoreManager/DefaultDataStoreManager.cs +++ b/test/ODataEndToEnd/Microsoft.OData.Service.Library/DataStoreManager/DefaultDataStoreManager.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. See License.txt in the project root for license information. using System; -using System.Collections.Concurrent; using System.Collections.Generic; using System.Timers; @@ -11,23 +10,29 @@ namespace Microsoft.OData.Service.Library.DataStoreManager /// /// Default resource management class to manage resources. /// Use a dictionary to easily access the resource by and make a constraint on the total number of resources. - /// Use a timer for each reasource, when the resource live longer than , it will be destroyed automatically. + /// Use a timer for each resource, when the resource live longer than , it will be destroyed automatically. /// public class DefaultDataStoreManager :IDataStoreManager where TDataStoreType : class, new() { /// /// The max capacity of the resource container, this is a constraint for memory cost. /// - public int MaxDataStoreInstanceCapacity { get; set; } = 1000; + public int MaxDataStoreInstanceCapacity { get; set; } /// /// The max life time of each resource. When the resource lives longer than that, it will be destroyed automatically. /// Besides, when the resource container is full, the resource live longest will be destroyed. /// - public TimeSpan MaxDataStoreInstanceLifeTime { get; set; } = new TimeSpan(0, 15, 0); + public TimeSpan MaxDataStoreInstanceLifeTime { get; set; } private Dictionary _dataStoreDict = new Dictionary(); + public DefaultDataStoreManager() + { + MaxDataStoreInstanceCapacity = 1000; + MaxDataStoreInstanceLifeTime = new TimeSpan(0, 15, 0); + } + public TDataStoreType ResetDataStoreInstance(TKey key) { if (_dataStoreDict.ContainsKey(key)) diff --git a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/ServiceReference/TrippinProxy.cs b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/ServiceReference/TrippinProxy.cs index 1b2ac5ef..e250a7df 100644 --- a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/ServiceReference/TrippinProxy.cs +++ b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/ServiceReference/TrippinProxy.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -// Generation date: 5/26/2016 1:22:04 PM +// Generation date: 8/8/2016 8:37:28 AM namespace Microsoft.OData.Service.Sample.Trippin.Models { /// @@ -21,7 +21,7 @@ public partial class TrippinDataServiceContext : global::Microsoft.OData.Client. /// Initialize a new TrippinDataServiceContext object. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - public TrippinDataServiceContext(global::System.Uri serviceRoot) : + public TrippinDataServiceContext(global::System.Uri serviceRoot) : base(serviceRoot, global::Microsoft.OData.Client.ODataProtocolVersion.V4) { this.ResolveName = new global::System.Func(this.ResolveNameFromType); @@ -44,7 +44,7 @@ public TrippinDataServiceContext(global::System.Uri serviceRoot) : { return resolvedType; } - resolvedType = this.DefaultResolveType(typeName, "Default", "Default"); + resolvedType = this.DefaultResolveType(typeName, "Different.Namespace", "Different.Namespace"); if ((resolvedType != null)) { return resolvedType; @@ -68,13 +68,13 @@ protected string ResolveNameFromType(global::System.Type clientType) } return string.Concat("Microsoft.OData.Service.Sample.Trippin.Models.", clientType.Name); } - if (clientType.Namespace.Equals("Default", global::System.StringComparison.Ordinal)) + if (clientType.Namespace.Equals("Different.Namespace", global::System.StringComparison.Ordinal)) { if (originalNameAttribute != null) { - return string.Concat("Default.", originalNameAttribute.OriginalName); + return string.Concat("Different.Namespace.", originalNameAttribute.OriginalName); } - return string.Concat("Default.", clientType.Name); + return string.Concat("Different.Namespace.", clientType.Name); } if (originalNameAttribute != null) { @@ -83,205 +83,405 @@ protected string ResolveNameFromType(global::System.Type clientType) return clientType.FullName; } /// - /// There are no comments for People in the schema. + /// There are no comments for Airlines in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("People")] - public global::Microsoft.OData.Client.DataServiceQuery People + [global::Microsoft.OData.Client.OriginalNameAttribute("Airlines")] + public global::Microsoft.OData.Client.DataServiceQuery Airlines { get { - if ((this._People == null)) + if ((this._Airlines == null)) { - this._People = base.CreateQuery("People"); + this._Airlines = base.CreateQuery("Airlines"); } - return this._People; + return this._Airlines; } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Client.DataServiceQuery _People; + private global::Microsoft.OData.Client.DataServiceQuery _Airlines; /// - /// There are no comments for Orders in the schema. + /// There are no comments for Airports in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Orders")] - public global::Microsoft.OData.Client.DataServiceQuery Orders + [global::Microsoft.OData.Client.OriginalNameAttribute("Airports")] + public global::Microsoft.OData.Client.DataServiceQuery Airports { get { - if ((this._Orders == null)) + if ((this._Airports == null)) { - this._Orders = base.CreateQuery("Orders"); + this._Airports = base.CreateQuery("Airports"); } - return this._Orders; + return this._Airports; } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Client.DataServiceQuery _Orders; + private global::Microsoft.OData.Client.DataServiceQuery _Airports; /// - /// There are no comments for Airports in the schema. + /// There are no comments for Conferences in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Airports")] - public global::Microsoft.OData.Client.DataServiceQuery Airports + [global::Microsoft.OData.Client.OriginalNameAttribute("Conferences")] + public global::Microsoft.OData.Client.DataServiceQuery Conferences { get { - if ((this._Airports == null)) + if ((this._Conferences == null)) { - this._Airports = base.CreateQuery("Airports"); + this._Conferences = base.CreateQuery("Conferences"); } - return this._Airports; + return this._Conferences; } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Client.DataServiceQuery _Airports; + private global::Microsoft.OData.Client.DataServiceQuery _Conferences; /// - /// There are no comments for Airlines in the schema. + /// There are no comments for Sponsors in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Airlines")] - public global::Microsoft.OData.Client.DataServiceQuery Airlines + [global::Microsoft.OData.Client.OriginalNameAttribute("Sponsors")] + public global::Microsoft.OData.Client.DataServiceQuery Sponsors { get { - if ((this._Airlines == null)) + if ((this._Sponsors == null)) { - this._Airlines = base.CreateQuery("Airlines"); + this._Sponsors = base.CreateQuery("Sponsors"); } - return this._Airlines; + return this._Sponsors; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Client.DataServiceQuery _Sponsors; + /// + /// There are no comments for Events in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Events")] + public global::Microsoft.OData.Client.DataServiceQuery Events + { + get + { + if ((this._Events == null)) + { + this._Events = base.CreateQuery("Events"); + } + return this._Events; } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Client.DataServiceQuery _Airlines; + private global::Microsoft.OData.Client.DataServiceQuery _Events; /// /// There are no comments for Flights in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] [global::Microsoft.OData.Client.OriginalNameAttribute("Flights")] - public global::Microsoft.OData.Client.DataServiceQuery Flights + public global::Microsoft.OData.Client.DataServiceQuery Flights { get { if ((this._Flights == null)) { - this._Flights = base.CreateQuery("Flights"); + this._Flights = base.CreateQuery("Flights"); } return this._Flights; } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Client.DataServiceQuery _Flights; + private global::Microsoft.OData.Client.DataServiceQuery _Flights; + /// + /// There are no comments for Orders in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Orders")] + public global::Microsoft.OData.Client.DataServiceQuery Orders + { + get + { + if ((this._Orders == null)) + { + this._Orders = base.CreateQuery("Orders"); + } + return this._Orders; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Client.DataServiceQuery _Orders; + /// + /// There are no comments for People in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("People")] + public global::Microsoft.OData.Client.DataServiceQuery People + { + get + { + if ((this._People == null)) + { + this._People = base.CreateQuery("People"); + } + return this._People; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Client.DataServiceQuery _People; /// /// There are no comments for Trips in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] [global::Microsoft.OData.Client.OriginalNameAttribute("Trips")] - public global::Microsoft.OData.Client.DataServiceQuery Trips + public global::Microsoft.OData.Client.DataServiceQuery Trips { get { if ((this._Trips == null)) { - this._Trips = base.CreateQuery("Trips"); + this._Trips = base.CreateQuery("Trips"); } return this._Trips; } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Client.DataServiceQuery _Trips; + private global::Microsoft.OData.Client.DataServiceQuery _Trips; /// - /// There are no comments for Events in the schema. + /// There are no comments for Staffs in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Events")] - public global::Microsoft.OData.Client.DataServiceQuery Events + [global::Microsoft.OData.Client.OriginalNameAttribute("Staffs")] + public global::Microsoft.OData.Client.DataServiceQuery Staffs { get { - if ((this._Events == null)) + if ((this._Staffs == null)) { - this._Events = base.CreateQuery("Events"); + this._Staffs = base.CreateQuery("Staffs"); } - return this._Events; + return this._Staffs; } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Client.DataServiceQuery _Events; + private global::Microsoft.OData.Client.DataServiceQuery _Staffs; /// - /// There are no comments for People in the schema. + /// There are no comments for Flights1 in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - public void AddToPeople(global::Microsoft.OData.Service.Sample.Trippin.Models.Person person) + [global::Microsoft.OData.Client.OriginalNameAttribute("Flights1")] + public global::Microsoft.OData.Client.DataServiceQuery Flights1 { - base.AddObject("People", person); + get + { + if ((this._Flights1 == null)) + { + this._Flights1 = base.CreateQuery("Flights1"); + } + return this._Flights1; + } } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Client.DataServiceQuery _Flights1; /// - /// There are no comments for Orders in the schema. + /// There are no comments for Flights2 in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - public void AddToOrders(global::Microsoft.OData.Service.Sample.Trippin.Models.Order order) + [global::Microsoft.OData.Client.OriginalNameAttribute("Flights2")] + public global::Microsoft.OData.Client.DataServiceQuery Flights2 { - base.AddObject("Orders", order); + get + { + if ((this._Flights2 == null)) + { + this._Flights2 = base.CreateQuery("Flights2"); + } + return this._Flights2; + } } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Client.DataServiceQuery _Flights2; /// - /// There are no comments for Airports in the schema. + /// There are no comments for PeopleWithAge in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - public void AddToAirports(global::Microsoft.OData.Service.Sample.Trippin.Models.Airport airport) + [global::Microsoft.OData.Client.OriginalNameAttribute("PeopleWithAge")] + public global::Microsoft.OData.Client.DataServiceQuery PeopleWithAge { - base.AddObject("Airports", airport); + get + { + if ((this._PeopleWithAge == null)) + { + this._PeopleWithAge = base.CreateQuery("PeopleWithAge"); + } + return this._PeopleWithAge; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Client.DataServiceQuery _PeopleWithAge; + /// + /// There are no comments for PeopleWithAge1 in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("PeopleWithAge1")] + public global::Microsoft.OData.Client.DataServiceQuery PeopleWithAge1 + { + get + { + if ((this._PeopleWithAge1 == null)) + { + this._PeopleWithAge1 = base.CreateQuery("PeopleWithAge1"); + } + return this._PeopleWithAge1; + } } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Client.DataServiceQuery _PeopleWithAge1; /// /// There are no comments for Airlines in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - public void AddToAirlines(global::Microsoft.OData.Service.Sample.Trippin.Models.Airline airline) + public void AddToAirlines(Airline airline) { base.AddObject("Airlines", airline); } /// + /// There are no comments for Airports in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public void AddToAirports(Airport airport) + { + base.AddObject("Airports", airport); + } + /// + /// There are no comments for Conferences in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public void AddToConferences(Conference conference) + { + base.AddObject("Conferences", conference); + } + /// + /// There are no comments for Sponsors in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public void AddToSponsors(Sponsor sponsor) + { + base.AddObject("Sponsors", sponsor); + } + /// + /// There are no comments for Events in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public void AddToEvents(Event @event) + { + base.AddObject("Events", @event); + } + /// /// There are no comments for Flights in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - public void AddToFlights(global::Microsoft.OData.Service.Sample.Trippin.Models.Flight flight) + public void AddToFlights(Flight flight) { base.AddObject("Flights", flight); } /// + /// There are no comments for Orders in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public void AddToOrders(Order order) + { + base.AddObject("Orders", order); + } + /// + /// There are no comments for People in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public void AddToPeople(Person person) + { + base.AddObject("People", person); + } + /// /// There are no comments for Trips in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - public void AddToTrips(global::Microsoft.OData.Service.Sample.Trippin.Models.Trip trip) + public void AddToTrips(Trip trip) { base.AddObject("Trips", trip); } /// - /// There are no comments for Events in the schema. + /// There are no comments for Staffs in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - public void AddToEvents(global::Microsoft.OData.Service.Sample.Trippin.Models.Event @event) + public void AddToStaffs(Staff staff) { - base.AddObject("Events", @event); + base.AddObject("Staffs", staff); + } + /// + /// There are no comments for Flights1 in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public void AddToFlights1(Flight flight) + { + base.AddObject("Flights1", flight); + } + /// + /// There are no comments for Flights2 in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public void AddToFlights2(Flight flight) + { + base.AddObject("Flights2", flight); + } + /// + /// There are no comments for PeopleWithAge in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public void AddToPeopleWithAge(PersonWithAge personWithAge) + { + base.AddObject("PeopleWithAge", personWithAge); + } + /// + /// There are no comments for PeopleWithAge1 in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public void AddToPeopleWithAge1(PersonWithAge personWithAge) + { + base.AddObject("PeopleWithAge1", personWithAge); } /// /// There are no comments for Me in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] [global::Microsoft.OData.Client.OriginalNameAttribute("Me")] - public global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle Me + public PersonSingle Me { get { if ((this._Me == null)) { - this._Me = new global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle(this, "Me"); + this._Me = new PersonSingle(this, "Me"); } return this._Me; } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle _Me; + private PersonSingle _Me; + /// + /// There are no comments for PeopleWithAgeMe in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("PeopleWithAgeMe")] + public PersonWithAgeSingle PeopleWithAgeMe + { + get + { + if ((this._PeopleWithAgeMe == null)) + { + this._PeopleWithAgeMe = new PersonWithAgeSingle(this, "PeopleWithAgeMe"); + } + return this._PeopleWithAgeMe; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private PersonWithAgeSingle _PeopleWithAgeMe; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] private abstract class GeneratedEdmModel { @@ -291,65 +491,55 @@ private abstract class GeneratedEdmModel private const string Edmx = @" - - - - - - - - - - - - - - - - - - - - - - - - - + - - + - - - - + + + - + - + - + - + - + + + + + + + + + + + + + + + + + - - - - - + + + + + @@ -365,44 +555,102 @@ private abstract class GeneratedEdmModel - + - + + - - - - - - + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - + + + + + + + + + + + + + + + + + + + - - + + + + + @@ -410,41 +658,179 @@ private abstract class GeneratedEdmModel + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - @@ -452,10 +838,34 @@ private abstract class GeneratedEdmModel + + + + + + + + + + FlightId + ConfirmationCode + StartsAt + EndsAt + Duration + + + + + + + + + + @@ -466,16 +876,87 @@ private abstract class GeneratedEdmModel - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "; @@ -504,6 +985,46 @@ private abstract class GeneratedEdmModel } } /// + /// There are no comments for GetPrimitive in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetPrimitive")] + public global::Microsoft.OData.Client.DataServiceQuerySingle GetPrimitive() + { + return this.CreateFunctionQuerySingle("", "GetPrimitive", false); + } + /// + /// There are no comments for GetNullPrimitive in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetNullPrimitive")] + public global::Microsoft.OData.Client.DataServiceQuerySingle GetNullPrimitive() + { + return this.CreateFunctionQuerySingle("", "GetNullPrimitive", false); + } + /// + /// There are no comments for GetEnum in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetEnum")] + public global::Microsoft.OData.Client.DataServiceQuerySingle> GetEnum(global::System.Nullable f) + { + return this.CreateFunctionQuerySingle>("", "GetEnum", false, new global::Microsoft.OData.Client.UriOperationParameter("f", f)); + } + /// + /// There are no comments for GetNullEnum in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetNullEnum")] + public global::Microsoft.OData.Client.DataServiceQuerySingle> GetNullEnum() + { + return this.CreateFunctionQuerySingle>("", "GetNullEnum", false); + } + /// + /// There are no comments for GetComplex in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetComplex")] + public global::Microsoft.OData.Client.DataServiceQuerySingle GetComplex(global::Microsoft.OData.Service.Sample.Trippin.Models.Location l) + { + return this.CreateFunctionQuerySingle("", "GetComplex", false, new global::Microsoft.OData.Client.UriOperationParameter("l", l)); + } + /// /// There are no comments for GetPersonWithMostFriends in the schema. /// [global::Microsoft.OData.Client.OriginalNameAttribute("GetPersonWithMostFriends")] @@ -512,6 +1033,14 @@ private abstract class GeneratedEdmModel return new global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle(this.CreateFunctionQuerySingle("", "GetPersonWithMostFriends", false)); } /// + /// There are no comments for GetNullEntity in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetNullEntity")] + public global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle GetNullEntity() + { + return new global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle(this.CreateFunctionQuerySingle("", "GetNullEntity", false)); + } + /// /// There are no comments for GetPeopleWithFriendsAtLeast in the schema. /// [global::Microsoft.OData.Client.OriginalNameAttribute("GetPeopleWithFriendsAtLeast")] @@ -520,6 +1049,71 @@ private abstract class GeneratedEdmModel return this.CreateFunctionQuery("", "GetPeopleWithFriendsAtLeast", false, new global::Microsoft.OData.Client.UriOperationParameter("n", n)); } /// + /// There are no comments for GetPeopleWithFriendsAtLeastMost in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetPeopleWithFriendsAtLeastMost")] + public global::Microsoft.OData.Client.DataServiceQuery GetPeopleWithFriendsAtLeastMost(int n, int m) + { + return this.CreateFunctionQuery("", "GetPeopleWithFriendsAtLeastMost", false, new global::Microsoft.OData.Client.UriOperationParameter("n", n), + new global::Microsoft.OData.Client.UriOperationParameter("m", m)); + } + /// + /// There are no comments for GetNullEntityCollection in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetNullEntityCollection")] + public global::Microsoft.OData.Client.DataServiceQuery GetNullEntityCollection() + { + return this.CreateFunctionQuery("", "GetNullEntityCollection", false); + } + /// + /// There are no comments for GetIEnumerable in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetIEnumerable")] + public global::Microsoft.OData.Client.DataServiceQuery GetIEnumerable(global::System.Collections.Generic.ICollection intEnumerable) + { + return this.CreateFunctionQuery("", "GetIEnumerable", false, new global::Microsoft.OData.Client.UriOperationParameter("intEnumerable", intEnumerable)); + } + /// + /// There are no comments for GetICollection in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetICollection")] + public global::Microsoft.OData.Client.DataServiceQuery GetICollection(global::System.Collections.Generic.ICollection intColl) + { + return this.CreateFunctionQuery("", "GetICollection", false, new global::Microsoft.OData.Client.UriOperationParameter("intColl", intColl)); + } + /// + /// There are no comments for GetArray in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetArray")] + public global::Microsoft.OData.Client.DataServiceQuery GetArray(global::System.Collections.Generic.ICollection intArray) + { + return this.CreateFunctionQuery("", "GetArray", false, new global::Microsoft.OData.Client.UriOperationParameter("intArray", intArray)); + } + /// + /// There are no comments for GetEnumCollection in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetEnumCollection")] + public global::Microsoft.OData.Client.DataServiceQuery GetEnumCollection(global::System.Collections.Generic.ICollection coll) + { + return this.CreateFunctionQuery("", "GetEnumCollection", false, new global::Microsoft.OData.Client.UriOperationParameter("coll", coll)); + } + /// + /// There are no comments for GetComplexCollection in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetComplexCollection")] + public global::Microsoft.OData.Client.DataServiceQuery GetComplexCollection(global::System.Collections.Generic.ICollection coll) + { + return this.CreateFunctionQuery("", "GetComplexCollection", false, new global::Microsoft.OData.Client.UriOperationParameter("coll", coll)); + } + /// + /// There are no comments for GetWithException in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetWithException")] + public global::Microsoft.OData.Client.DataServiceQuery GetWithException() + { + return this.CreateFunctionQuery("", "GetWithException", false); + } + /// /// There are no comments for ResetDataSource in the schema. /// [global::Microsoft.OData.Client.OriginalNameAttribute("ResetDataSource")] @@ -535,38 +1129,831 @@ private abstract class GeneratedEdmModel { return new global::Microsoft.OData.Client.DataServiceActionQuery(this, this.BaseUri.OriginalString.Trim('/') + "/CleanUpExpiredTrips"); } - } - - /// - /// There are no comments for PersonSingle in the schema. - /// - [global::Microsoft.OData.Client.OriginalNameAttribute("PersonSingle")] - public partial class PersonSingle : global::Microsoft.OData.Client.DataServiceQuerySingle - { /// - /// Initialize a new PersonSingle object. + /// There are no comments for CleanUpTrip in the schema. /// - public PersonSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) - : base(context, path) {} - + [global::Microsoft.OData.Client.OriginalNameAttribute("CleanUpTrip")] + public global::Microsoft.OData.Client.DataServiceActionQuery CleanUpTrip(int id, global::Microsoft.OData.Service.Sample.Trippin.Models.Location location, global::System.Nullable feature) + { + return new global::Microsoft.OData.Client.DataServiceActionQuery(this, this.BaseUri.OriginalString.Trim('/') + "/CleanUpTrip", new global::Microsoft.OData.Client.BodyOperationParameter("id", id), + new global::Microsoft.OData.Client.BodyOperationParameter("location", location), + new global::Microsoft.OData.Client.BodyOperationParameter("feature", feature)); + } /// - /// Initialize a new PersonSingle object. + /// There are no comments for CleanUpTrips in the schema. /// - public PersonSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) - : base(context, path, isComposable) {} - + [global::Microsoft.OData.Client.OriginalNameAttribute("CleanUpTrips")] + public global::Microsoft.OData.Client.DataServiceActionQuery CleanUpTrips(global::System.Collections.Generic.ICollection ids, global::System.Collections.Generic.ICollection locations, global::System.Collections.Generic.ICollection features) + { + return new global::Microsoft.OData.Client.DataServiceActionQuery(this, this.BaseUri.OriginalString.Trim('/') + "/CleanUpTrips", new global::Microsoft.OData.Client.BodyOperationParameter("ids", ids), + new global::Microsoft.OData.Client.BodyOperationParameter("locations", locations), + new global::Microsoft.OData.Client.BodyOperationParameter("features", features)); + } /// - /// Initialize a new PersonSingle object. + /// There are no comments for ActionPrimitive in the schema. /// - public PersonSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) - : base(query) {} - + [global::Microsoft.OData.Client.OriginalNameAttribute("ActionPrimitive")] + public global::Microsoft.OData.Client.DataServiceActionQuerySingle ActionPrimitive() + { + return new global::Microsoft.OData.Client.DataServiceActionQuerySingle(this, this.BaseUri.OriginalString.Trim('/') + "/ActionPrimitive"); + } /// - /// There are no comments for BestFriend in the schema. + /// There are no comments for ActionNullPrimitive in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("ActionNullPrimitive")] + public global::Microsoft.OData.Client.DataServiceActionQuerySingle ActionNullPrimitive() + { + return new global::Microsoft.OData.Client.DataServiceActionQuerySingle(this, this.BaseUri.OriginalString.Trim('/') + "/ActionNullPrimitive"); + } + /// + /// There are no comments for ActionEnum in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("ActionEnum")] + public global::Microsoft.OData.Client.DataServiceActionQuerySingle> ActionEnum(global::System.Nullable f) + { + return new global::Microsoft.OData.Client.DataServiceActionQuerySingle>(this, this.BaseUri.OriginalString.Trim('/') + "/ActionEnum", new global::Microsoft.OData.Client.BodyOperationParameter("f", f)); + } + /// + /// There are no comments for ActionNullEnum in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("ActionNullEnum")] + public global::Microsoft.OData.Client.DataServiceActionQuerySingle> ActionNullEnum() + { + return new global::Microsoft.OData.Client.DataServiceActionQuerySingle>(this, this.BaseUri.OriginalString.Trim('/') + "/ActionNullEnum"); + } + /// + /// There are no comments for ActionComplex in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("ActionComplex")] + public global::Microsoft.OData.Client.DataServiceActionQuerySingle ActionComplex(global::Microsoft.OData.Service.Sample.Trippin.Models.Location l) + { + return new global::Microsoft.OData.Client.DataServiceActionQuerySingle(this, this.BaseUri.OriginalString.Trim('/') + "/ActionComplex", new global::Microsoft.OData.Client.BodyOperationParameter("l", l)); + } + /// + /// There are no comments for ActionPrimitiveArray in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("ActionPrimitiveArray")] + public global::Microsoft.OData.Client.DataServiceActionQuery ActionPrimitiveArray(global::System.Collections.Generic.ICollection intArray) + { + return new global::Microsoft.OData.Client.DataServiceActionQuery(this, this.BaseUri.OriginalString.Trim('/') + "/ActionPrimitiveArray", new global::Microsoft.OData.Client.BodyOperationParameter("intArray", intArray)); + } + /// + /// There are no comments for ActionEnumCollection in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("ActionEnumCollection")] + public global::Microsoft.OData.Client.DataServiceActionQuery ActionEnumCollection(global::System.Collections.Generic.ICollection coll) + { + return new global::Microsoft.OData.Client.DataServiceActionQuery(this, this.BaseUri.OriginalString.Trim('/') + "/ActionEnumCollection", new global::Microsoft.OData.Client.BodyOperationParameter("coll", coll)); + } + /// + /// There are no comments for ActionComplexCollection in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("ActionComplexCollection")] + public global::Microsoft.OData.Client.DataServiceActionQuery ActionComplexCollection(global::System.Collections.Generic.ICollection coll) + { + return new global::Microsoft.OData.Client.DataServiceActionQuery(this, this.BaseUri.OriginalString.Trim('/') + "/ActionComplexCollection", new global::Microsoft.OData.Client.BodyOperationParameter("coll", coll)); + } + /// + /// There are no comments for ActionWithException in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("ActionWithException")] + public global::Microsoft.OData.Client.DataServiceActionQuery ActionWithException() + { + return new global::Microsoft.OData.Client.DataServiceActionQuery(this, this.BaseUri.OriginalString.Trim('/') + "/ActionWithException"); + } + /// + /// There are no comments for ActionForAuthorization in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("ActionForAuthorization")] + public global::Microsoft.OData.Client.DataServiceActionQuery ActionForAuthorization() + { + return new global::Microsoft.OData.Client.DataServiceActionQuery(this, this.BaseUri.OriginalString.Trim('/') + "/ActionForAuthorization"); + } + } + /// + /// There are no comments for AirlineSingle in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("AirlineSingle")] + public partial class AirlineSingle : global::Microsoft.OData.Client.DataServiceQuerySingle + { + /// + /// Initialize a new AirlineSingle object. + /// + public AirlineSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) + : base(context, path) {} + + /// + /// Initialize a new AirlineSingle object. + /// + public AirlineSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) + : base(context, path, isComposable) {} + + /// + /// Initialize a new AirlineSingle object. + /// + public AirlineSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) + : base(query) {} + + } + /// + /// There are no comments for Airline in the schema. + /// + /// + /// AirlineCode + /// + [global::Microsoft.OData.Client.Key("AirlineCode")] + [global::Microsoft.OData.Client.EntitySet("Airlines")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Airline")] + public partial class Airline : global::Microsoft.OData.Client.BaseEntityType, global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new Airline object. + /// + /// Initial value of AirlineCode. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public static Airline CreateAirline(string airlineCode) + { + Airline airline = new Airline(); + airline.AirlineCode = airlineCode; + return airline; + } + /// + /// There are no comments for Property AirlineCode in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("AirlineCode")] + public string AirlineCode + { + get + { + return this._AirlineCode; + } + set + { + this.OnAirlineCodeChanging(value); + this._AirlineCode = value; + this.OnAirlineCodeChanged(); + this.OnPropertyChanged("AirlineCode"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private string _AirlineCode; + partial void OnAirlineCodeChanging(string value); + partial void OnAirlineCodeChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Name")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property TimeStampValue in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("TimeStampValue")] + public byte[] TimeStampValue + { + get + { + return this._TimeStampValue; + } + set + { + this.OnTimeStampValueChanging(value); + this._TimeStampValue = value; + this.OnTimeStampValueChanged(); + this.OnPropertyChanged("TimeStampValue"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private byte[] _TimeStampValue; + partial void OnTimeStampValueChanging(byte[] value); + partial void OnTimeStampValueChanged(); + /// + /// This event is raised when the value of the property is changed + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + /// + /// The value of the property is changed + /// + /// property name + [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)); + } + } + } + /// + /// There are no comments for AirportSingle in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("AirportSingle")] + public partial class AirportSingle : global::Microsoft.OData.Client.DataServiceQuerySingle + { + /// + /// Initialize a new AirportSingle object. + /// + public AirportSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) + : base(context, path) {} + + /// + /// Initialize a new AirportSingle object. + /// + public AirportSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) + : base(context, path, isComposable) {} + + /// + /// Initialize a new AirportSingle object. + /// + public AirportSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) + : base(query) {} + + } + /// + /// There are no comments for Airport in the schema. + /// + /// + /// IcaoCode + /// + [global::Microsoft.OData.Client.Key("IcaoCode")] + [global::Microsoft.OData.Client.EntitySet("Airports")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Airport")] + public partial class Airport : global::Microsoft.OData.Client.BaseEntityType, global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new Airport object. + /// + /// Initial value of IcaoCode. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public static Airport CreateAirport(string icaoCode) + { + Airport airport = new Airport(); + airport.IcaoCode = icaoCode; + return airport; + } + /// + /// There are no comments for Property IcaoCode in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("IcaoCode")] + public string IcaoCode + { + get + { + return this._IcaoCode; + } + set + { + this.OnIcaoCodeChanging(value); + this._IcaoCode = value; + this.OnIcaoCodeChanged(); + this.OnPropertyChanged("IcaoCode"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private string _IcaoCode; + partial void OnIcaoCodeChanging(string value); + partial void OnIcaoCodeChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Name")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property IataCode in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("IataCode")] + public string IataCode + { + get + { + return this._IataCode; + } + set + { + this.OnIataCodeChanging(value); + this._IataCode = value; + this.OnIataCodeChanged(); + this.OnPropertyChanged("IataCode"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private string _IataCode; + partial void OnIataCodeChanging(string value); + partial void OnIataCodeChanged(); + /// + /// This event is raised when the value of the property is changed + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + /// + /// The value of the property is changed + /// + /// property name + [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)); + } + } + } + /// + /// There are no comments for ConferenceSingle in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("ConferenceSingle")] + public partial class ConferenceSingle : global::Microsoft.OData.Client.DataServiceQuerySingle + { + /// + /// Initialize a new ConferenceSingle object. + /// + public ConferenceSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) + : base(context, path) {} + + /// + /// Initialize a new ConferenceSingle object. + /// + public ConferenceSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) + : base(context, path, isComposable) {} + + /// + /// Initialize a new ConferenceSingle object. + /// + public ConferenceSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) + : base(query) {} + + /// + /// There are no comments for Sponsors in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Sponsors")] + public global::Microsoft.OData.Client.DataServiceQuery Sponsors + { + get + { + if (!this.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + if ((this._Sponsors == null)) + { + this._Sponsors = Context.CreateQuery(GetPath("Sponsors")); + } + return this._Sponsors; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Client.DataServiceQuery _Sponsors; + } + /// + /// There are no comments for Conference in the schema. + /// + /// + /// ConferenceId + /// + [global::Microsoft.OData.Client.Key("ConferenceId")] + [global::Microsoft.OData.Client.EntitySet("Conferences")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Conference")] + public partial class Conference : global::Microsoft.OData.Client.BaseEntityType, global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new Conference object. + /// + /// Initial value of ConferenceId. + /// Initial value of NumberOfAttendees. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public static Conference CreateConference(int conferenceId, int numberOfAttendees) + { + Conference conference = new Conference(); + conference.ConferenceId = conferenceId; + conference.NumberOfAttendees = numberOfAttendees; + return conference; + } + /// + /// There are no comments for Property ConferenceId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("ConferenceId")] + public int ConferenceId + { + get + { + return this._ConferenceId; + } + set + { + this.OnConferenceIdChanging(value); + this._ConferenceId = value; + this.OnConferenceIdChanged(); + this.OnPropertyChanged("ConferenceId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private int _ConferenceId; + partial void OnConferenceIdChanging(int value); + partial void OnConferenceIdChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Name")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property NumberOfAttendees in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("NumberOfAttendees")] + public int NumberOfAttendees + { + get + { + return this._NumberOfAttendees; + } + set + { + this.OnNumberOfAttendeesChanging(value); + this._NumberOfAttendees = value; + this.OnNumberOfAttendeesChanged(); + this.OnPropertyChanged("NumberOfAttendees"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private int _NumberOfAttendees; + partial void OnNumberOfAttendeesChanging(int value); + partial void OnNumberOfAttendeesChanged(); + /// + /// There are no comments for Property Sponsors in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Sponsors")] + public global::Microsoft.OData.Client.DataServiceCollection Sponsors + { + get + { + return this._Sponsors; + } + set + { + this.OnSponsorsChanging(value); + this._Sponsors = value; + this.OnSponsorsChanged(); + this.OnPropertyChanged("Sponsors"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Client.DataServiceCollection _Sponsors = new global::Microsoft.OData.Client.DataServiceCollection(null, global::Microsoft.OData.Client.TrackingMode.None); + partial void OnSponsorsChanging(global::Microsoft.OData.Client.DataServiceCollection value); + partial void OnSponsorsChanged(); + /// + /// This event is raised when the value of the property is changed + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + /// + /// The value of the property is changed + /// + /// property name + [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)); + } + } + } + /// + /// There are no comments for SponsorSingle in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("SponsorSingle")] + public partial class SponsorSingle : global::Microsoft.OData.Client.DataServiceQuerySingle + { + /// + /// Initialize a new SponsorSingle object. + /// + public SponsorSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) + : base(context, path) {} + + /// + /// Initialize a new SponsorSingle object. + /// + public SponsorSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) + : base(context, path, isComposable) {} + + /// + /// Initialize a new SponsorSingle object. + /// + public SponsorSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) + : base(query) {} + + } + /// + /// There are no comments for Sponsor in the schema. + /// + /// + /// SponsorId + /// + [global::Microsoft.OData.Client.Key("SponsorId")] + [global::Microsoft.OData.Client.EntitySet("Sponsors")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Sponsor")] + public partial class Sponsor : global::Microsoft.OData.Client.BaseEntityType, global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new Sponsor object. + /// + /// Initial value of SponsorId. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public static Sponsor CreateSponsor(int sponsorId) + { + Sponsor sponsor = new Sponsor(); + sponsor.SponsorId = sponsorId; + return sponsor; + } + /// + /// There are no comments for Property SponsorId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("SponsorId")] + public int SponsorId + { + get + { + return this._SponsorId; + } + set + { + this.OnSponsorIdChanging(value); + this._SponsorId = value; + this.OnSponsorIdChanged(); + this.OnPropertyChanged("SponsorId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private int _SponsorId; + partial void OnSponsorIdChanging(int value); + partial void OnSponsorIdChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Name")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// This event is raised when the value of the property is changed + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + /// + /// The value of the property is changed + /// + /// property name + [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)); + } + } + } + /// + /// There are no comments for EventSingle in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("EventSingle")] + public partial class EventSingle : global::Microsoft.OData.Client.DataServiceQuerySingle + { + /// + /// Initialize a new EventSingle object. + /// + public EventSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) + : base(context, path) {} + + /// + /// Initialize a new EventSingle object. + /// + public EventSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) + : base(context, path, isComposable) {} + + /// + /// Initialize a new EventSingle object. + /// + public EventSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) + : base(query) {} + + } + /// + /// There are no comments for Event in the schema. + /// + /// + /// Id + /// + [global::Microsoft.OData.Client.Key("Id")] + [global::Microsoft.OData.Client.EntitySet("Events")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Event")] + public partial class Event : global::Microsoft.OData.Client.BaseEntityType, global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new Event object. + /// + /// Initial value of Id. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public static Event CreateEvent(int ID) + { + Event @event = new Event(); + @event.Id = ID; + return @event; + } + /// + /// There are no comments for Property Id in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Id")] + public int Id + { + get + { + return this._Id; + } + set + { + this.OnIdChanging(value); + this._Id = value; + this.OnIdChanged(); + this.OnPropertyChanged("Id"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private int _Id; + partial void OnIdChanging(int value); + partial void OnIdChanged(); + /// + /// There are no comments for Property OccursAt in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("OccursAt")] + public global::Microsoft.OData.Service.Sample.Trippin.Models.Location OccursAt + { + get + { + return this._OccursAt; + } + set + { + this.OnOccursAtChanging(value); + this._OccursAt = value; + this.OnOccursAtChanged(); + this.OnPropertyChanged("OccursAt"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Service.Sample.Trippin.Models.Location _OccursAt; + partial void OnOccursAtChanging(global::Microsoft.OData.Service.Sample.Trippin.Models.Location value); + partial void OnOccursAtChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Description")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// This event is raised when the value of the property is changed /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("BestFriend")] - public global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle BestFriend + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + /// + /// The value of the property is changed + /// + /// property name + [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)); + } + } + } + /// + /// There are no comments for FlightSingle in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("FlightSingle")] + public partial class FlightSingle : global::Microsoft.OData.Client.DataServiceQuerySingle + { + /// + /// Initialize a new FlightSingle object. + /// + public FlightSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) + : base(context, path) {} + + /// + /// Initialize a new FlightSingle object. + /// + public FlightSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) + : base(context, path, isComposable) {} + + /// + /// Initialize a new FlightSingle object. + /// + public FlightSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) + : base(query) {} + + /// + /// There are no comments for From in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("From")] + public global::Microsoft.OData.Service.Sample.Trippin.Models.AirportSingle From { get { @@ -574,21 +1961,21 @@ public PersonSingle(global::Microsoft.OData.Client.DataServiceQuerySingle - /// There are no comments for Friends in the schema. + /// There are no comments for To in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Friends")] - public global::Microsoft.OData.Client.DataServiceQuery Friends + [global::Microsoft.OData.Client.OriginalNameAttribute("To")] + public global::Microsoft.OData.Service.Sample.Trippin.Models.AirportSingle To { get { @@ -596,21 +1983,21 @@ public PersonSingle(global::Microsoft.OData.Client.DataServiceQuerySingle(GetPath("Friends")); + this._To = new global::Microsoft.OData.Service.Sample.Trippin.Models.AirportSingle(this.Context, GetPath("To")); } - return this._Friends; + return this._To; } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Client.DataServiceQuery _Friends; + private global::Microsoft.OData.Service.Sample.Trippin.Models.AirportSingle _To; /// - /// There are no comments for Trips in the schema. + /// There are no comments for Airline in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Trips")] - public global::Microsoft.OData.Client.DataServiceQuery Trips + [global::Microsoft.OData.Client.OriginalNameAttribute("Airline")] + public global::Microsoft.OData.Service.Sample.Trippin.Models.AirlineSingle Airline { get { @@ -618,443 +2005,619 @@ public PersonSingle(global::Microsoft.OData.Client.DataServiceQuerySingle(GetPath("Trips")); + this._Airline = new global::Microsoft.OData.Service.Sample.Trippin.Models.AirlineSingle(this.Context, GetPath("Airline")); } - return this._Trips; + return this._Airline; } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Client.DataServiceQuery _Trips; + private global::Microsoft.OData.Service.Sample.Trippin.Models.AirlineSingle _Airline; } /// - /// There are no comments for Person in the schema. + /// There are no comments for Flight in the schema. /// /// - /// PersonId + /// FlightId /// - [global::Microsoft.OData.Client.Key("PersonId")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Person")] - public partial class Person : global::Microsoft.OData.Client.BaseEntityType, global::System.ComponentModel.INotifyPropertyChanged + [global::Microsoft.OData.Client.Key("FlightId")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Flight")] + public partial class Flight : global::Microsoft.OData.Client.BaseEntityType, global::System.ComponentModel.INotifyPropertyChanged { /// - /// Create a new Person object. + /// Create a new Flight object. /// - /// Initial value of FirstName. - /// Initial value of Concurrency. - /// Initial value of BirthDate. - /// Initial value of BirthTime. - /// Initial value of BirthDateTime. - /// Initial value of FavoriteFeature. + /// Initial value of FlightId. + /// Initial value of StartsAt. + /// Initial value of EndsAt. + /// Initial value of Duration. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - public static Person CreatePerson(string firstName, - long concurrency, - global::Microsoft.OData.Edm.Library.Date birthDate, - global::Microsoft.OData.Edm.Library.TimeOfDay birthTime, - global::System.DateTimeOffset birthDateTime, - global::Microsoft.OData.Service.Sample.Trippin.Models.Feature favoriteFeature) + public static Flight CreateFlight(int flightId, global::System.DateTimeOffset startsAt, global::System.DateTimeOffset endsAt, global::System.TimeSpan duration) { - Person person = new Person(); - person.FirstName = firstName; - person.Concurrency = concurrency; - person.BirthDate = birthDate; - person.BirthTime = birthTime; - person.BirthDateTime = birthDateTime; - person.FavoriteFeature = favoriteFeature; - return person; + Flight flight = new Flight(); + flight.FlightId = flightId; + flight.StartsAt = startsAt; + flight.EndsAt = endsAt; + flight.Duration = duration; + return flight; } /// - /// There are no comments for Property PersonId in the schema. + /// There are no comments for Property FlightId in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("PersonId")] - public long PersonId + [global::Microsoft.OData.Client.OriginalNameAttribute("FlightId")] + public int FlightId + { + get + { + return this._FlightId; + } + set + { + this.OnFlightIdChanging(value); + this._FlightId = value; + this.OnFlightIdChanged(); + this.OnPropertyChanged("FlightId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private int _FlightId; + partial void OnFlightIdChanging(int value); + partial void OnFlightIdChanged(); + /// + /// There are no comments for Property ConfirmationCode in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("ConfirmationCode")] + public string ConfirmationCode + { + get + { + return this._ConfirmationCode; + } + set + { + this.OnConfirmationCodeChanging(value); + this._ConfirmationCode = value; + this.OnConfirmationCodeChanged(); + this.OnPropertyChanged("ConfirmationCode"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private string _ConfirmationCode; + partial void OnConfirmationCodeChanging(string value); + partial void OnConfirmationCodeChanged(); + /// + /// There are no comments for Property StartsAt in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("StartsAt")] + public global::System.DateTimeOffset StartsAt + { + get + { + return this._StartsAt; + } + set + { + this.OnStartsAtChanging(value); + this._StartsAt = value; + this.OnStartsAtChanged(); + this.OnPropertyChanged("StartsAt"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::System.DateTimeOffset _StartsAt; + partial void OnStartsAtChanging(global::System.DateTimeOffset value); + partial void OnStartsAtChanged(); + /// + /// There are no comments for Property EndsAt in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("EndsAt")] + public global::System.DateTimeOffset EndsAt + { + get + { + return this._EndsAt; + } + set + { + this.OnEndsAtChanging(value); + this._EndsAt = value; + this.OnEndsAtChanged(); + this.OnPropertyChanged("EndsAt"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::System.DateTimeOffset _EndsAt; + partial void OnEndsAtChanging(global::System.DateTimeOffset value); + partial void OnEndsAtChanged(); + /// + /// There are no comments for Property Duration in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Duration")] + public global::System.TimeSpan Duration + { + get + { + return this._Duration; + } + set + { + this.OnDurationChanging(value); + this._Duration = value; + this.OnDurationChanged(); + this.OnPropertyChanged("Duration"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::System.TimeSpan _Duration; + partial void OnDurationChanging(global::System.TimeSpan value); + partial void OnDurationChanged(); + /// + /// There are no comments for Property SeatNumber in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("SeatNumber")] + public string SeatNumber { get { - return this._PersonId; + return this._SeatNumber; } set { - this.OnPersonIdChanging(value); - this._PersonId = value; - this.OnPersonIdChanged(); - this.OnPropertyChanged("PersonId"); + this.OnSeatNumberChanging(value); + this._SeatNumber = value; + this.OnSeatNumberChanged(); + this.OnPropertyChanged("SeatNumber"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private long _PersonId; - partial void OnPersonIdChanging(global::System.Nullable value); - partial void OnPersonIdChanged(); + private string _SeatNumber; + partial void OnSeatNumberChanging(string value); + partial void OnSeatNumberChanged(); /// - /// There are no comments for Property UserName in the schema. + /// There are no comments for Property FlightNumber in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("UserName")] - public string UserName + [global::Microsoft.OData.Client.OriginalNameAttribute("FlightNumber")] + public string FlightNumber { get { - return this._UserName; + return this._FlightNumber; } set { - this.OnUserNameChanging(value); - this._UserName = value; - this.OnUserNameChanged(); - this.OnPropertyChanged("UserName"); + this.OnFlightNumberChanging(value); + this._FlightNumber = value; + this.OnFlightNumberChanged(); + this.OnPropertyChanged("FlightNumber"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private string _UserName; - partial void OnUserNameChanging(string value); - partial void OnUserNameChanged(); + private string _FlightNumber; + partial void OnFlightNumberChanging(string value); + partial void OnFlightNumberChanged(); /// - /// There are no comments for Property FirstName in the schema. + /// There are no comments for Property FromId in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("FirstName")] - public string FirstName + [global::Microsoft.OData.Client.OriginalNameAttribute("FromId")] + public string FromId { get { - return this._FirstName; + return this._FromId; } set { - this.OnFirstNameChanging(value); - this._FirstName = value; - this.OnFirstNameChanged(); - this.OnPropertyChanged("FirstName"); + this.OnFromIdChanging(value); + this._FromId = value; + this.OnFromIdChanged(); + this.OnPropertyChanged("FromId"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private string _FirstName; - partial void OnFirstNameChanging(string value); - partial void OnFirstNameChanged(); + private string _FromId; + partial void OnFromIdChanging(string value); + partial void OnFromIdChanged(); /// - /// There are no comments for Property LastName in the schema. + /// There are no comments for Property ToId in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("LastName")] - public string LastName + [global::Microsoft.OData.Client.OriginalNameAttribute("ToId")] + public string ToId { get { - return this._LastName; + return this._ToId; } set { - this.OnLastNameChanging(value); - this._LastName = value; - this.OnLastNameChanged(); - this.OnPropertyChanged("LastName"); + this.OnToIdChanging(value); + this._ToId = value; + this.OnToIdChanged(); + this.OnPropertyChanged("ToId"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private string _LastName; - partial void OnLastNameChanging(string value); - partial void OnLastNameChanged(); + private string _ToId; + partial void OnToIdChanging(string value); + partial void OnToIdChanged(); /// - /// There are no comments for Property Age in the schema. + /// There are no comments for Property AirlineId in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Age")] - public global::System.Nullable Age + [global::Microsoft.OData.Client.OriginalNameAttribute("AirlineId")] + public string AirlineId { get { - return this._Age; + return this._AirlineId; } set { - this.OnAgeChanging(value); - this._Age = value; - this.OnAgeChanged(); - this.OnPropertyChanged("Age"); + this.OnAirlineIdChanging(value); + this._AirlineId = value; + this.OnAirlineIdChanged(); + this.OnPropertyChanged("AirlineId"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::System.Nullable _Age; - partial void OnAgeChanging(global::System.Nullable value); - partial void OnAgeChanged(); + private string _AirlineId; + partial void OnAirlineIdChanging(string value); + partial void OnAirlineIdChanged(); /// - /// There are no comments for Property Concurrency in the schema. + /// There are no comments for Property From in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Concurrency")] - public long Concurrency + [global::Microsoft.OData.Client.OriginalNameAttribute("From")] + public global::Microsoft.OData.Service.Sample.Trippin.Models.Airport From { get { - return this._Concurrency; + return this._From; } set { - this.OnConcurrencyChanging(value); - this._Concurrency = value; - this.OnConcurrencyChanged(); - this.OnPropertyChanged("Concurrency"); + this.OnFromChanging(value); + this._From = value; + this.OnFromChanged(); + this.OnPropertyChanged("From"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private long _Concurrency; - partial void OnConcurrencyChanging(long value); - partial void OnConcurrencyChanged(); + private global::Microsoft.OData.Service.Sample.Trippin.Models.Airport _From; + partial void OnFromChanging(global::Microsoft.OData.Service.Sample.Trippin.Models.Airport value); + partial void OnFromChanged(); /// - /// There are no comments for Property BirthDate in the schema. + /// There are no comments for Property To in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("BirthDate")] - public global::Microsoft.OData.Edm.Library.Date BirthDate + [global::Microsoft.OData.Client.OriginalNameAttribute("To")] + public global::Microsoft.OData.Service.Sample.Trippin.Models.Airport To { get { - return this._BirthDate; + return this._To; } set { - this.OnBirthDateChanging(value); - this._BirthDate = value; - this.OnBirthDateChanged(); - this.OnPropertyChanged("BirthDate"); + this.OnToChanging(value); + this._To = value; + this.OnToChanged(); + this.OnPropertyChanged("To"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Edm.Library.Date _BirthDate; - partial void OnBirthDateChanging(global::Microsoft.OData.Edm.Library.Date value); - partial void OnBirthDateChanged(); + private global::Microsoft.OData.Service.Sample.Trippin.Models.Airport _To; + partial void OnToChanging(global::Microsoft.OData.Service.Sample.Trippin.Models.Airport value); + partial void OnToChanged(); /// - /// There are no comments for Property BirthDate2 in the schema. + /// There are no comments for Property Airline in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("BirthDate2")] - public global::System.Nullable BirthDate2 + [global::Microsoft.OData.Client.OriginalNameAttribute("Airline")] + public global::Microsoft.OData.Service.Sample.Trippin.Models.Airline Airline { get { - return this._BirthDate2; + return this._Airline; } set { - this.OnBirthDate2Changing(value); - this._BirthDate2 = value; - this.OnBirthDate2Changed(); - this.OnPropertyChanged("BirthDate2"); + this.OnAirlineChanging(value); + this._Airline = value; + this.OnAirlineChanged(); + this.OnPropertyChanged("Airline"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::System.Nullable _BirthDate2; - partial void OnBirthDate2Changing(global::System.Nullable value); - partial void OnBirthDate2Changed(); + private global::Microsoft.OData.Service.Sample.Trippin.Models.Airline _Airline; + partial void OnAirlineChanging(global::Microsoft.OData.Service.Sample.Trippin.Models.Airline value); + partial void OnAirlineChanged(); /// - /// There are no comments for Property BirthTime in the schema. + /// This event is raised when the value of the property is changed /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("BirthTime")] - public global::Microsoft.OData.Edm.Library.TimeOfDay BirthTime + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + /// + /// The value of the property is changed + /// + /// property name + [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)); + } + } + } + /// + /// There are no comments for OrderSingle in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("OrderSingle")] + public partial class OrderSingle : global::Microsoft.OData.Client.DataServiceQuerySingle + { + /// + /// Initialize a new OrderSingle object. + /// + public OrderSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) + : base(context, path) {} + + /// + /// Initialize a new OrderSingle object. + /// + public OrderSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) + : base(context, path, isComposable) {} + + /// + /// Initialize a new OrderSingle object. + /// + public OrderSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) + : base(query) {} + + } + /// + /// There are no comments for Order in the schema. + /// + /// + /// PersonId + /// OrderId + /// + [global::Microsoft.OData.Client.Key("PersonId", "OrderId")] + [global::Microsoft.OData.Client.EntitySet("Orders")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Order")] + public partial class Order : global::Microsoft.OData.Client.BaseEntityType, global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new Order object. + /// + /// Initial value of PersonId. + /// Initial value of OrderId. + /// Initial value of Price. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public static Order CreateOrder(int personId, int orderId, double price) + { + Order order = new Order(); + order.PersonId = personId; + order.OrderId = orderId; + order.Price = price; + return order; + } + /// + /// There are no comments for Property PersonId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("PersonId")] + public int PersonId { get { - return this._BirthTime; + return this._PersonId; } set { - this.OnBirthTimeChanging(value); - this._BirthTime = value; - this.OnBirthTimeChanged(); - this.OnPropertyChanged("BirthTime"); + this.OnPersonIdChanging(value); + this._PersonId = value; + this.OnPersonIdChanged(); + this.OnPropertyChanged("PersonId"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Edm.Library.TimeOfDay _BirthTime; - partial void OnBirthTimeChanging(global::Microsoft.OData.Edm.Library.TimeOfDay value); - partial void OnBirthTimeChanged(); + private int _PersonId; + partial void OnPersonIdChanging(int value); + partial void OnPersonIdChanged(); /// - /// There are no comments for Property BirthTime2 in the schema. + /// There are no comments for Property OrderId in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("BirthTime2")] - public global::System.Nullable BirthTime2 + [global::Microsoft.OData.Client.OriginalNameAttribute("OrderId")] + public int OrderId { get { - return this._BirthTime2; + return this._OrderId; } set { - this.OnBirthTime2Changing(value); - this._BirthTime2 = value; - this.OnBirthTime2Changed(); - this.OnPropertyChanged("BirthTime2"); + this.OnOrderIdChanging(value); + this._OrderId = value; + this.OnOrderIdChanged(); + this.OnPropertyChanged("OrderId"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::System.Nullable _BirthTime2; - partial void OnBirthTime2Changing(global::System.Nullable value); - partial void OnBirthTime2Changed(); + private int _OrderId; + partial void OnOrderIdChanging(int value); + partial void OnOrderIdChanged(); /// - /// There are no comments for Property BirthDateTime in the schema. + /// There are no comments for Property Price in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("BirthDateTime")] - public global::System.DateTimeOffset BirthDateTime + [global::Microsoft.OData.Client.OriginalNameAttribute("Price")] + public double Price { get { - return this._BirthDateTime; + return this._Price; } set { - this.OnBirthDateTimeChanging(value); - this._BirthDateTime = value; - this.OnBirthDateTimeChanged(); - this.OnPropertyChanged("BirthDateTime"); + this.OnPriceChanging(value); + this._Price = value; + this.OnPriceChanged(); + this.OnPropertyChanged("Price"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::System.DateTimeOffset _BirthDateTime; - partial void OnBirthDateTimeChanging(global::System.DateTimeOffset value); - partial void OnBirthDateTimeChanged(); + private double _Price; + partial void OnPriceChanging(double value); + partial void OnPriceChanged(); /// - /// There are no comments for Property BirthDateTime2 in the schema. + /// There are no comments for Property ComputedProperty in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("BirthDateTime2")] - public global::System.Nullable BirthDateTime2 + [global::Microsoft.OData.Client.OriginalNameAttribute("ComputedProperty")] + public string ComputedProperty { get { - return this._BirthDateTime2; + return this._ComputedProperty; } set { - this.OnBirthDateTime2Changing(value); - this._BirthDateTime2 = value; - this.OnBirthDateTime2Changed(); - this.OnPropertyChanged("BirthDateTime2"); + this.OnComputedPropertyChanging(value); + this._ComputedProperty = value; + this.OnComputedPropertyChanged(); + this.OnPropertyChanged("ComputedProperty"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::System.Nullable _BirthDateTime2; - partial void OnBirthDateTime2Changing(global::System.Nullable value); - partial void OnBirthDateTime2Changed(); + private string _ComputedProperty; + partial void OnComputedPropertyChanging(string value); + partial void OnComputedPropertyChanged(); /// - /// There are no comments for Property FavoriteFeature in the schema. + /// There are no comments for Property ImmutableProperty in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("FavoriteFeature")] - public global::Microsoft.OData.Service.Sample.Trippin.Models.Feature FavoriteFeature + [global::Microsoft.OData.Client.OriginalNameAttribute("ImmutableProperty")] + public string ImmutableProperty { get { - return this._FavoriteFeature; + return this._ImmutableProperty; } set { - this.OnFavoriteFeatureChanging(value); - this._FavoriteFeature = value; - this.OnFavoriteFeatureChanged(); - this.OnPropertyChanged("FavoriteFeature"); + this.OnImmutablePropertyChanging(value); + this._ImmutableProperty = value; + this.OnImmutablePropertyChanged(); + this.OnPropertyChanged("ImmutableProperty"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Service.Sample.Trippin.Models.Feature _FavoriteFeature; - partial void OnFavoriteFeatureChanging(global::Microsoft.OData.Service.Sample.Trippin.Models.Feature value); - partial void OnFavoriteFeatureChanged(); + private string _ImmutableProperty; + partial void OnImmutablePropertyChanging(string value); + partial void OnImmutablePropertyChanged(); /// - /// There are no comments for Property FavoriteFeature2 in the schema. + /// There are no comments for Property NormalOrderDetail in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("FavoriteFeature2")] - public global::System.Nullable FavoriteFeature2 + [global::Microsoft.OData.Client.OriginalNameAttribute("NormalOrderDetail")] + public global::Microsoft.OData.Service.Sample.Trippin.Models.OrderDetail NormalOrderDetail { get { - return this._FavoriteFeature2; + return this._NormalOrderDetail; } set { - this.OnFavoriteFeature2Changing(value); - this._FavoriteFeature2 = value; - this.OnFavoriteFeature2Changed(); - this.OnPropertyChanged("FavoriteFeature2"); + this.OnNormalOrderDetailChanging(value); + this._NormalOrderDetail = value; + this.OnNormalOrderDetailChanged(); + this.OnPropertyChanged("NormalOrderDetail"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::System.Nullable _FavoriteFeature2; - partial void OnFavoriteFeature2Changing(global::System.Nullable value); - partial void OnFavoriteFeature2Changed(); + private global::Microsoft.OData.Service.Sample.Trippin.Models.OrderDetail _NormalOrderDetail; + partial void OnNormalOrderDetailChanging(global::Microsoft.OData.Service.Sample.Trippin.Models.OrderDetail value); + partial void OnNormalOrderDetailChanged(); /// - /// There are no comments for Property BestFriend in the schema. + /// There are no comments for Property ComputedOrderDetail in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("BestFriend")] - public global::Microsoft.OData.Service.Sample.Trippin.Models.Person BestFriend + [global::Microsoft.OData.Client.OriginalNameAttribute("ComputedOrderDetail")] + public global::Microsoft.OData.Service.Sample.Trippin.Models.OrderDetail ComputedOrderDetail { get { - return this._BestFriend; + return this._ComputedOrderDetail; } set { - this.OnBestFriendChanging(value); - this._BestFriend = value; - this.OnBestFriendChanged(); - this.OnPropertyChanged("BestFriend"); + this.OnComputedOrderDetailChanging(value); + this._ComputedOrderDetail = value; + this.OnComputedOrderDetailChanged(); + this.OnPropertyChanged("ComputedOrderDetail"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Service.Sample.Trippin.Models.Person _BestFriend; - partial void OnBestFriendChanging(global::Microsoft.OData.Service.Sample.Trippin.Models.Person value); - partial void OnBestFriendChanged(); + private global::Microsoft.OData.Service.Sample.Trippin.Models.OrderDetail _ComputedOrderDetail; + partial void OnComputedOrderDetailChanging(global::Microsoft.OData.Service.Sample.Trippin.Models.OrderDetail value); + partial void OnComputedOrderDetailChanged(); /// - /// There are no comments for Property Friends in the schema. + /// There are no comments for Property ImmutableOrderDetail in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Friends")] - public global::Microsoft.OData.Client.DataServiceCollection Friends + [global::Microsoft.OData.Client.OriginalNameAttribute("ImmutableOrderDetail")] + public global::Microsoft.OData.Service.Sample.Trippin.Models.OrderDetail ImmutableOrderDetail { get { - return this._Friends; + return this._ImmutableOrderDetail; } set { - this.OnFriendsChanging(value); - this._Friends = value; - this.OnFriendsChanged(); - this.OnPropertyChanged("Friends"); + this.OnImmutableOrderDetailChanging(value); + this._ImmutableOrderDetail = value; + this.OnImmutableOrderDetailChanged(); + this.OnPropertyChanged("ImmutableOrderDetail"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Client.DataServiceCollection _Friends = new global::Microsoft.OData.Client.DataServiceCollection(null, global::Microsoft.OData.Client.TrackingMode.None); - partial void OnFriendsChanging(global::Microsoft.OData.Client.DataServiceCollection value); - partial void OnFriendsChanged(); + private global::Microsoft.OData.Service.Sample.Trippin.Models.OrderDetail _ImmutableOrderDetail; + partial void OnImmutableOrderDetailChanging(global::Microsoft.OData.Service.Sample.Trippin.Models.OrderDetail value); + partial void OnImmutableOrderDetailChanged(); /// - /// There are no comments for Property Trips in the schema. + /// There are no comments for Property Description in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Trips")] - public global::Microsoft.OData.Client.DataServiceCollection Trips + [global::Microsoft.OData.Client.OriginalNameAttribute("Description")] + public string Description { get { - return this._Trips; + return this._Description; } set { - this.OnTripsChanging(value); - this._Trips = value; - this.OnTripsChanged(); - this.OnPropertyChanged("Trips"); + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Client.DataServiceCollection _Trips = new global::Microsoft.OData.Client.DataServiceCollection(null, global::Microsoft.OData.Client.TrackingMode.None); - partial void OnTripsChanging(global::Microsoft.OData.Client.DataServiceCollection value); - partial void OnTripsChanged(); + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); /// /// This event is raised when the value of the property is changed /// @@ -1072,75 +2635,143 @@ protected virtual void OnPropertyChanged(string property) this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); } } - /// - /// There are no comments for GetNumberOfFriends in the schema. - /// - [global::Microsoft.OData.Client.OriginalNameAttribute("GetNumberOfFriends")] - public global::Microsoft.OData.Client.DataServiceQuerySingle GetNumberOfFriends() - { - global::System.Uri requestUri; - Context.TryGetUri(this, out requestUri); - - return this.Context.CreateFunctionQuerySingle(string.Join("/", global::System.Linq.Enumerable.Select(global::System.Linq.Enumerable.Skip(requestUri.Segments, this.Context.BaseUri.Segments.Length), s => s.Trim('/'))), "Microsoft.OData.Service.Sample.Trippin.Models.GetNumberOfFriends", false); - } } /// - /// There are no comments for OrderSingle in the schema. + /// There are no comments for PersonSingle in the schema. /// - [global::Microsoft.OData.Client.OriginalNameAttribute("OrderSingle")] - public partial class OrderSingle : global::Microsoft.OData.Client.DataServiceQuerySingle + [global::Microsoft.OData.Client.OriginalNameAttribute("PersonSingle")] + public partial class PersonSingle : global::Microsoft.OData.Client.DataServiceQuerySingle { /// - /// Initialize a new OrderSingle object. + /// Initialize a new PersonSingle object. /// - public OrderSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) + public PersonSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) : base(context, path) {} /// - /// Initialize a new OrderSingle object. + /// Initialize a new PersonSingle object. /// - public OrderSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) + public PersonSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) : base(context, path, isComposable) {} /// - /// Initialize a new OrderSingle object. + /// Initialize a new PersonSingle object. /// - public OrderSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) + public PersonSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) : base(query) {} + /// + /// There are no comments for BestFriend in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("BestFriend")] + public global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle BestFriend + { + get + { + if (!this.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + if ((this._BestFriend == null)) + { + this._BestFriend = new global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle(this.Context, GetPath("BestFriend")); + } + return this._BestFriend; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle _BestFriend; + /// + /// There are no comments for Friends in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Friends")] + public global::Microsoft.OData.Client.DataServiceQuery Friends + { + get + { + if (!this.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + if ((this._Friends == null)) + { + this._Friends = Context.CreateQuery(GetPath("Friends")); + } + return this._Friends; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Client.DataServiceQuery _Friends; + /// + /// There are no comments for Trips in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Trips")] + public global::Microsoft.OData.Client.DataServiceQuery Trips + { + get + { + if (!this.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + if ((this._Trips == null)) + { + this._Trips = Context.CreateQuery(GetPath("Trips")); + } + return this._Trips; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Client.DataServiceQuery _Trips; } /// - /// There are no comments for Order in the schema. + /// There are no comments for Person in the schema. /// /// /// PersonId - /// OrderId /// - [global::Microsoft.OData.Client.Key("PersonId", "OrderId")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Order")] - public partial class Order : global::Microsoft.OData.Client.BaseEntityType, global::System.ComponentModel.INotifyPropertyChanged + [global::Microsoft.OData.Client.Key("PersonId")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Person")] + public partial class Person : global::Microsoft.OData.Client.BaseEntityType, global::System.ComponentModel.INotifyPropertyChanged { /// - /// Create a new Order object. + /// Create a new Person object. /// /// Initial value of PersonId. - /// Initial value of OrderId. - /// Initial value of Price. + /// Initial value of FirstName. + /// Initial value of Concurrency. + /// Initial value of BirthDate. + /// Initial value of BirthTime. + /// Initial value of BirthDateTime. + /// Initial value of FavoriteFeature. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - public static Order CreateOrder(int personId, int orderId, double price) + public static Person CreatePerson(long personId, + string firstName, + long concurrency, + global::Microsoft.OData.Edm.Library.Date birthDate, + global::Microsoft.OData.Edm.Library.TimeOfDay birthTime, + global::System.DateTimeOffset birthDateTime, + global::Microsoft.OData.Service.Sample.Trippin.Models.Feature favoriteFeature) { - Order order = new Order(); - order.PersonId = personId; - order.OrderId = orderId; - order.Price = price; - return order; + Person person = new Person(); + person.PersonId = personId; + person.FirstName = firstName; + person.Concurrency = concurrency; + person.BirthDate = birthDate; + person.BirthTime = birthTime; + person.BirthDateTime = birthDateTime; + person.FavoriteFeature = favoriteFeature; + return person; } /// /// There are no comments for Property PersonId in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] [global::Microsoft.OData.Client.OriginalNameAttribute("PersonId")] - public int PersonId + public long PersonId { get { @@ -1155,344 +2786,377 @@ public int PersonId } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private int _PersonId; - partial void OnPersonIdChanging(int value); + private long _PersonId; + partial void OnPersonIdChanging(long value); partial void OnPersonIdChanged(); /// - /// There are no comments for Property OrderId in the schema. + /// There are no comments for Property UserName in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("OrderId")] - public int OrderId + [global::Microsoft.OData.Client.OriginalNameAttribute("UserName")] + public string UserName { get { - return this._OrderId; + return this._UserName; } set { - this.OnOrderIdChanging(value); - this._OrderId = value; - this.OnOrderIdChanged(); - this.OnPropertyChanged("OrderId"); + this.OnUserNameChanging(value); + this._UserName = value; + this.OnUserNameChanged(); + this.OnPropertyChanged("UserName"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private int _OrderId; - partial void OnOrderIdChanging(int value); - partial void OnOrderIdChanged(); + private string _UserName; + partial void OnUserNameChanging(string value); + partial void OnUserNameChanged(); /// - /// There are no comments for Property Price in the schema. + /// There are no comments for Property FirstName in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Price")] - public double Price + [global::Microsoft.OData.Client.OriginalNameAttribute("FirstName")] + public string FirstName { get { - return this._Price; + return this._FirstName; } set { - this.OnPriceChanging(value); - this._Price = value; - this.OnPriceChanged(); - this.OnPropertyChanged("Price"); + this.OnFirstNameChanging(value); + this._FirstName = value; + this.OnFirstNameChanged(); + this.OnPropertyChanged("FirstName"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private double _Price; - partial void OnPriceChanging(double value); - partial void OnPriceChanged(); + private string _FirstName; + partial void OnFirstNameChanging(string value); + partial void OnFirstNameChanged(); /// - /// There are no comments for Property Description in the schema. + /// There are no comments for Property LastName in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Description")] - public string Description + [global::Microsoft.OData.Client.OriginalNameAttribute("LastName")] + public string LastName { get { - return this._Description; + return this._LastName; } set { - this.OnDescriptionChanging(value); - this._Description = value; - this.OnDescriptionChanged(); - this.OnPropertyChanged("Description"); + this.OnLastNameChanging(value); + this._LastName = value; + this.OnLastNameChanged(); + this.OnPropertyChanged("LastName"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private string _Description; - partial void OnDescriptionChanging(string value); - partial void OnDescriptionChanged(); + private string _LastName; + partial void OnLastNameChanging(string value); + partial void OnLastNameChanged(); /// - /// This event is raised when the value of the property is changed + /// There are no comments for Property Age in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::Microsoft.OData.Client.OriginalNameAttribute("Age")] + public global::System.Nullable Age + { + get + { + return this._Age; + } + set + { + this.OnAgeChanging(value); + this._Age = value; + this.OnAgeChanged(); + this.OnPropertyChanged("Age"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::System.Nullable _Age; + partial void OnAgeChanging(global::System.Nullable value); + partial void OnAgeChanged(); /// - /// The value of the property is changed + /// There are no comments for Property Concurrency in the schema. /// - /// property name [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - protected virtual void OnPropertyChanged(string property) + [global::Microsoft.OData.Client.OriginalNameAttribute("Concurrency")] + public long Concurrency { - if ((this.PropertyChanged != null)) + get { - this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + return this._Concurrency; + } + set + { + this.OnConcurrencyChanging(value); + this._Concurrency = value; + this.OnConcurrencyChanged(); + this.OnPropertyChanged("Concurrency"); } } - } - /// - /// There are no comments for AirportSingle in the schema. - /// - [global::Microsoft.OData.Client.OriginalNameAttribute("AirportSingle")] - public partial class AirportSingle : global::Microsoft.OData.Client.DataServiceQuerySingle - { + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private long _Concurrency; + partial void OnConcurrencyChanging(long value); + partial void OnConcurrencyChanged(); /// - /// Initialize a new AirportSingle object. + /// There are no comments for Property BirthDate in the schema. /// - public AirportSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) - : base(context, path) {} - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("BirthDate")] + public global::Microsoft.OData.Edm.Library.Date BirthDate + { + get + { + return this._BirthDate; + } + set + { + this.OnBirthDateChanging(value); + this._BirthDate = value; + this.OnBirthDateChanged(); + this.OnPropertyChanged("BirthDate"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Edm.Library.Date _BirthDate; + partial void OnBirthDateChanging(global::Microsoft.OData.Edm.Library.Date value); + partial void OnBirthDateChanged(); /// - /// Initialize a new AirportSingle object. + /// There are no comments for Property BirthDate2 in the schema. /// - public AirportSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) - : base(context, path, isComposable) {} - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("BirthDate2")] + public global::System.Nullable BirthDate2 + { + get + { + return this._BirthDate2; + } + set + { + this.OnBirthDate2Changing(value); + this._BirthDate2 = value; + this.OnBirthDate2Changed(); + this.OnPropertyChanged("BirthDate2"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::System.Nullable _BirthDate2; + partial void OnBirthDate2Changing(global::System.Nullable value); + partial void OnBirthDate2Changed(); /// - /// Initialize a new AirportSingle object. + /// There are no comments for Property BirthTime in the schema. /// - public AirportSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) - : base(query) {} - - } - /// - /// There are no comments for Airport in the schema. - /// - /// - /// IcaoCode - /// - [global::Microsoft.OData.Client.Key("IcaoCode")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Airport")] - public partial class Airport : global::Microsoft.OData.Client.BaseEntityType, global::System.ComponentModel.INotifyPropertyChanged - { + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("BirthTime")] + public global::Microsoft.OData.Edm.Library.TimeOfDay BirthTime + { + get + { + return this._BirthTime; + } + set + { + this.OnBirthTimeChanging(value); + this._BirthTime = value; + this.OnBirthTimeChanged(); + this.OnPropertyChanged("BirthTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Edm.Library.TimeOfDay _BirthTime; + partial void OnBirthTimeChanging(global::Microsoft.OData.Edm.Library.TimeOfDay value); + partial void OnBirthTimeChanged(); /// - /// Create a new Airport object. + /// There are no comments for Property BirthTime2 in the schema. /// - /// Initial value of IcaoCode. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - public static Airport CreateAirport(string icaoCode) + [global::Microsoft.OData.Client.OriginalNameAttribute("BirthTime2")] + public global::System.Nullable BirthTime2 { - Airport airport = new Airport(); - airport.IcaoCode = icaoCode; - return airport; + get + { + return this._BirthTime2; + } + set + { + this.OnBirthTime2Changing(value); + this._BirthTime2 = value; + this.OnBirthTime2Changed(); + this.OnPropertyChanged("BirthTime2"); + } } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::System.Nullable _BirthTime2; + partial void OnBirthTime2Changing(global::System.Nullable value); + partial void OnBirthTime2Changed(); /// - /// There are no comments for Property Name in the schema. + /// There are no comments for Property BirthDateTime in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Name")] - public string Name + [global::Microsoft.OData.Client.OriginalNameAttribute("BirthDateTime")] + public global::System.DateTimeOffset BirthDateTime { get { - return this._Name; + return this._BirthDateTime; } set { - this.OnNameChanging(value); - this._Name = value; - this.OnNameChanged(); - this.OnPropertyChanged("Name"); + this.OnBirthDateTimeChanging(value); + this._BirthDateTime = value; + this.OnBirthDateTimeChanged(); + this.OnPropertyChanged("BirthDateTime"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private string _Name; - partial void OnNameChanging(string value); - partial void OnNameChanged(); + private global::System.DateTimeOffset _BirthDateTime; + partial void OnBirthDateTimeChanging(global::System.DateTimeOffset value); + partial void OnBirthDateTimeChanged(); /// - /// There are no comments for Property IcaoCode in the schema. + /// There are no comments for Property BirthDateTime2 in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("IcaoCode")] - public string IcaoCode + [global::Microsoft.OData.Client.OriginalNameAttribute("BirthDateTime2")] + public global::System.Nullable BirthDateTime2 { get { - return this._IcaoCode; + return this._BirthDateTime2; } set { - this.OnIcaoCodeChanging(value); - this._IcaoCode = value; - this.OnIcaoCodeChanged(); - this.OnPropertyChanged("IcaoCode"); + this.OnBirthDateTime2Changing(value); + this._BirthDateTime2 = value; + this.OnBirthDateTime2Changed(); + this.OnPropertyChanged("BirthDateTime2"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private string _IcaoCode; - partial void OnIcaoCodeChanging(string value); - partial void OnIcaoCodeChanged(); + private global::System.Nullable _BirthDateTime2; + partial void OnBirthDateTime2Changing(global::System.Nullable value); + partial void OnBirthDateTime2Changed(); /// - /// There are no comments for Property IataCode in the schema. + /// There are no comments for Property FavoriteFeature in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("IataCode")] - public string IataCode + [global::Microsoft.OData.Client.OriginalNameAttribute("FavoriteFeature")] + public global::Microsoft.OData.Service.Sample.Trippin.Models.Feature FavoriteFeature { get { - return this._IataCode; + return this._FavoriteFeature; } set { - this.OnIataCodeChanging(value); - this._IataCode = value; - this.OnIataCodeChanged(); - this.OnPropertyChanged("IataCode"); + this.OnFavoriteFeatureChanging(value); + this._FavoriteFeature = value; + this.OnFavoriteFeatureChanged(); + this.OnPropertyChanged("FavoriteFeature"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private string _IataCode; - partial void OnIataCodeChanging(string value); - partial void OnIataCodeChanged(); - /// - /// This event is raised when the value of the property is changed - /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + private global::Microsoft.OData.Service.Sample.Trippin.Models.Feature _FavoriteFeature; + partial void OnFavoriteFeatureChanging(global::Microsoft.OData.Service.Sample.Trippin.Models.Feature value); + partial void OnFavoriteFeatureChanged(); /// - /// The value of the property is changed + /// There are no comments for Property FavoriteFeature2 in the schema. /// - /// property name [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - protected virtual void OnPropertyChanged(string property) + [global::Microsoft.OData.Client.OriginalNameAttribute("FavoriteFeature2")] + public global::System.Nullable FavoriteFeature2 { - if ((this.PropertyChanged != null)) + get { - this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + return this._FavoriteFeature2; + } + set + { + this.OnFavoriteFeature2Changing(value); + this._FavoriteFeature2 = value; + this.OnFavoriteFeature2Changed(); + this.OnPropertyChanged("FavoriteFeature2"); } } - } - /// - /// There are no comments for AirlineSingle in the schema. - /// - [global::Microsoft.OData.Client.OriginalNameAttribute("AirlineSingle")] - public partial class AirlineSingle : global::Microsoft.OData.Client.DataServiceQuerySingle - { - /// - /// Initialize a new AirlineSingle object. - /// - public AirlineSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) - : base(context, path) {} - - /// - /// Initialize a new AirlineSingle object. - /// - public AirlineSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) - : base(context, path, isComposable) {} - - /// - /// Initialize a new AirlineSingle object. - /// - public AirlineSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) - : base(query) {} - - } - /// - /// There are no comments for Airline in the schema. - /// - /// - /// AirlineCode - /// - [global::Microsoft.OData.Client.Key("AirlineCode")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Airline")] - public partial class Airline : global::Microsoft.OData.Client.BaseEntityType, global::System.ComponentModel.INotifyPropertyChanged - { - /// - /// Create a new Airline object. - /// - /// Initial value of AirlineCode. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - public static Airline CreateAirline(string airlineCode) - { - Airline airline = new Airline(); - airline.AirlineCode = airlineCode; - return airline; - } + private global::System.Nullable _FavoriteFeature2; + partial void OnFavoriteFeature2Changing(global::System.Nullable value); + partial void OnFavoriteFeature2Changed(); /// - /// There are no comments for Property AirlineCode in the schema. + /// There are no comments for Property BestFriend in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("AirlineCode")] - public string AirlineCode + [global::Microsoft.OData.Client.OriginalNameAttribute("BestFriend")] + public global::Microsoft.OData.Service.Sample.Trippin.Models.Person BestFriend { get { - return this._AirlineCode; + return this._BestFriend; } set { - this.OnAirlineCodeChanging(value); - this._AirlineCode = value; - this.OnAirlineCodeChanged(); - this.OnPropertyChanged("AirlineCode"); + this.OnBestFriendChanging(value); + this._BestFriend = value; + this.OnBestFriendChanged(); + this.OnPropertyChanged("BestFriend"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private string _AirlineCode; - partial void OnAirlineCodeChanging(string value); - partial void OnAirlineCodeChanged(); + private global::Microsoft.OData.Service.Sample.Trippin.Models.Person _BestFriend; + partial void OnBestFriendChanging(global::Microsoft.OData.Service.Sample.Trippin.Models.Person value); + partial void OnBestFriendChanged(); /// - /// There are no comments for Property Name in the schema. + /// There are no comments for Property Friends in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Name")] - public string Name + [global::Microsoft.OData.Client.OriginalNameAttribute("Friends")] + public global::Microsoft.OData.Client.DataServiceCollection Friends { get { - return this._Name; + return this._Friends; } set { - this.OnNameChanging(value); - this._Name = value; - this.OnNameChanged(); - this.OnPropertyChanged("Name"); + this.OnFriendsChanging(value); + this._Friends = value; + this.OnFriendsChanged(); + this.OnPropertyChanged("Friends"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private string _Name; - partial void OnNameChanging(string value); - partial void OnNameChanged(); + private global::Microsoft.OData.Client.DataServiceCollection _Friends = new global::Microsoft.OData.Client.DataServiceCollection(null, global::Microsoft.OData.Client.TrackingMode.None); + partial void OnFriendsChanging(global::Microsoft.OData.Client.DataServiceCollection value); + partial void OnFriendsChanged(); /// - /// There are no comments for Property TimeStampValue in the schema. + /// There are no comments for Property Trips in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("TimeStampValue")] - public byte[] TimeStampValue + [global::Microsoft.OData.Client.OriginalNameAttribute("Trips")] + public global::Microsoft.OData.Client.DataServiceCollection Trips { get { - return this._TimeStampValue; + return this._Trips; } set { - this.OnTimeStampValueChanging(value); - this._TimeStampValue = value; - this.OnTimeStampValueChanged(); - this.OnPropertyChanged("TimeStampValue"); + this.OnTripsChanging(value); + this._Trips = value; + this.OnTripsChanged(); + this.OnPropertyChanged("Trips"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private byte[] _TimeStampValue; - partial void OnTimeStampValueChanging(byte[] value); - partial void OnTimeStampValueChanged(); + private global::Microsoft.OData.Client.DataServiceCollection _Trips = new global::Microsoft.OData.Client.DataServiceCollection(null, global::Microsoft.OData.Client.TrackingMode.None); + partial void OnTripsChanging(global::Microsoft.OData.Client.DataServiceCollection value); + partial void OnTripsChanged(); /// /// This event is raised when the value of the property is changed /// @@ -1510,59 +3174,58 @@ protected virtual void OnPropertyChanged(string property) this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); } } + /// + /// There are no comments for GetPersonFriends in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetPersonFriends")] + public global::Microsoft.OData.Client.DataServiceQuery GetPersonFriends() + { + global::System.Uri requestUri; + Context.TryGetUri(this, out requestUri); + return this.Context.CreateFunctionQuery(string.Join("/", global::System.Linq.Enumerable.Select(global::System.Linq.Enumerable.Skip(requestUri.Segments, this.Context.BaseUri.Segments.Length), s => s.Trim('/'))), "Microsoft.OData.Service.Sample.Trippin.Models.GetPersonFriends", false); + } + /// + /// There are no comments for GetNumberOfFriends in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetNumberOfFriends")] + public global::Microsoft.OData.Client.DataServiceQuerySingle GetNumberOfFriends() + { + global::System.Uri requestUri; + Context.TryGetUri(this, out requestUri); + + return this.Context.CreateFunctionQuerySingle(string.Join("/", global::System.Linq.Enumerable.Select(global::System.Linq.Enumerable.Skip(requestUri.Segments, this.Context.BaseUri.Segments.Length), s => s.Trim('/'))), "Microsoft.OData.Service.Sample.Trippin.Models.GetNumberOfFriends", false); + } } /// - /// There are no comments for FlightSingle in the schema. + /// There are no comments for TripSingle in the schema. /// - [global::Microsoft.OData.Client.OriginalNameAttribute("FlightSingle")] - public partial class FlightSingle : global::Microsoft.OData.Client.DataServiceQuerySingle + [global::Microsoft.OData.Client.OriginalNameAttribute("TripSingle")] + public partial class TripSingle : global::Microsoft.OData.Client.DataServiceQuerySingle { /// - /// Initialize a new FlightSingle object. + /// Initialize a new TripSingle object. /// - public FlightSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) + public TripSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) : base(context, path) {} /// - /// Initialize a new FlightSingle object. + /// Initialize a new TripSingle object. /// - public FlightSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) + public TripSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) : base(context, path, isComposable) {} /// - /// Initialize a new FlightSingle object. + /// Initialize a new TripSingle object. /// - public FlightSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) + public TripSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) : base(query) {} /// - /// There are no comments for From in the schema. - /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("From")] - public global::Microsoft.OData.Service.Sample.Trippin.Models.AirportSingle From - { - get - { - if (!this.IsComposable) - { - throw new global::System.NotSupportedException("The previous function is not composable."); - } - if ((this._From == null)) - { - this._From = new global::Microsoft.OData.Service.Sample.Trippin.Models.AirportSingle(this.Context, GetPath("From")); - } - return this._From; - } - } - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Service.Sample.Trippin.Models.AirportSingle _From; - /// - /// There are no comments for To in the schema. + /// There are no comments for Flights in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("To")] - public global::Microsoft.OData.Service.Sample.Trippin.Models.AirportSingle To + [global::Microsoft.OData.Client.OriginalNameAttribute("Flights")] + public global::Microsoft.OData.Client.DataServiceQuery Flights { get { @@ -1570,21 +3233,21 @@ public FlightSingle(global::Microsoft.OData.Client.DataServiceQuerySingle(GetPath("Flights")); } - return this._To; + return this._Flights; } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Service.Sample.Trippin.Models.AirportSingle _To; + private global::Microsoft.OData.Client.DataServiceQuery _Flights; /// - /// There are no comments for Airline in the schema. + /// There are no comments for Events in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Airline")] - public global::Microsoft.OData.Service.Sample.Trippin.Models.AirlineSingle Airline + [global::Microsoft.OData.Client.OriginalNameAttribute("Events")] + public global::Microsoft.OData.Client.DataServiceQuery Events { get { @@ -1592,342 +3255,329 @@ public FlightSingle(global::Microsoft.OData.Client.DataServiceQuerySingle(GetPath("Events")); } - return this._Airline; + return this._Events; } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Service.Sample.Trippin.Models.AirlineSingle _Airline; + private global::Microsoft.OData.Client.DataServiceQuery _Events; } /// - /// There are no comments for Flight in the schema. + /// There are no comments for Trip in the schema. /// /// - /// FlightId + /// TripId /// - [global::Microsoft.OData.Client.Key("FlightId")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Flight")] - public partial class Flight : global::Microsoft.OData.Client.BaseEntityType, global::System.ComponentModel.INotifyPropertyChanged + [global::Microsoft.OData.Client.Key("TripId")] + [global::Microsoft.OData.Client.EntitySet("Trips")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Trip")] + public partial class Trip : global::Microsoft.OData.Client.BaseEntityType, global::System.ComponentModel.INotifyPropertyChanged { /// - /// Create a new Flight object. + /// Create a new Trip object. /// - /// Initial value of FlightId. + /// Initial value of TripId. + /// Initial value of ShareId. + /// Initial value of Budget. /// Initial value of StartsAt. /// Initial value of EndsAt. - /// Initial value of Duration. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - public static Flight CreateFlight(int flightId, global::System.DateTimeOffset startsAt, global::System.DateTimeOffset endsAt, global::System.TimeSpan duration) - { - Flight flight = new Flight(); - flight.FlightId = flightId; - flight.StartsAt = startsAt; - flight.EndsAt = endsAt; - flight.Duration = duration; - return flight; - } - /// - /// There are no comments for Property FlightId in the schema. - /// + /// Initial value of LastUpdated. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("FlightId")] - public int FlightId + public static Trip CreateTrip(int tripId, + global::System.Guid shareId, + float budget, + global::System.DateTimeOffset startsAt, + global::System.DateTimeOffset endsAt, + global::System.DateTimeOffset lastUpdated) { - get - { - return this._FlightId; - } - set - { - this.OnFlightIdChanging(value); - this._FlightId = value; - this.OnFlightIdChanged(); - this.OnPropertyChanged("FlightId"); - } + Trip trip = new Trip(); + trip.TripId = tripId; + trip.ShareId = shareId; + trip.Budget = budget; + trip.StartsAt = startsAt; + trip.EndsAt = endsAt; + trip.LastUpdated = lastUpdated; + return trip; } - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private int _FlightId; - partial void OnFlightIdChanging(int value); - partial void OnFlightIdChanged(); /// - /// There are no comments for Property ConfirmationCode in the schema. + /// There are no comments for Property TripId in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("ConfirmationCode")] - public string ConfirmationCode + [global::Microsoft.OData.Client.OriginalNameAttribute("TripId")] + public int TripId { get { - return this._ConfirmationCode; + return this._TripId; } set { - this.OnConfirmationCodeChanging(value); - this._ConfirmationCode = value; - this.OnConfirmationCodeChanged(); - this.OnPropertyChanged("ConfirmationCode"); + this.OnTripIdChanging(value); + this._TripId = value; + this.OnTripIdChanged(); + this.OnPropertyChanged("TripId"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private string _ConfirmationCode; - partial void OnConfirmationCodeChanging(string value); - partial void OnConfirmationCodeChanged(); + private int _TripId; + partial void OnTripIdChanging(int value); + partial void OnTripIdChanged(); /// - /// There are no comments for Property StartsAt in the schema. + /// There are no comments for Property TrackGuid in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("StartsAt")] - public global::System.DateTimeOffset StartsAt + [global::Microsoft.OData.Client.OriginalNameAttribute("TrackGuid")] + public global::System.Nullable TrackGuid { get { - return this._StartsAt; + return this._TrackGuid; } set { - this.OnStartsAtChanging(value); - this._StartsAt = value; - this.OnStartsAtChanged(); - this.OnPropertyChanged("StartsAt"); + this.OnTrackGuidChanging(value); + this._TrackGuid = value; + this.OnTrackGuidChanged(); + this.OnPropertyChanged("TrackGuid"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::System.DateTimeOffset _StartsAt; - partial void OnStartsAtChanging(global::System.DateTimeOffset value); - partial void OnStartsAtChanged(); + private global::System.Nullable _TrackGuid; + partial void OnTrackGuidChanging(global::System.Nullable value); + partial void OnTrackGuidChanged(); /// - /// There are no comments for Property EndsAt in the schema. + /// There are no comments for Property PersonId in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("EndsAt")] - public global::System.DateTimeOffset EndsAt + [global::Microsoft.OData.Client.OriginalNameAttribute("PersonId")] + public global::System.Nullable PersonId { get { - return this._EndsAt; + return this._PersonId; } set { - this.OnEndsAtChanging(value); - this._EndsAt = value; - this.OnEndsAtChanged(); - this.OnPropertyChanged("EndsAt"); + this.OnPersonIdChanging(value); + this._PersonId = value; + this.OnPersonIdChanged(); + this.OnPropertyChanged("PersonId"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::System.DateTimeOffset _EndsAt; - partial void OnEndsAtChanging(global::System.DateTimeOffset value); - partial void OnEndsAtChanged(); + private global::System.Nullable _PersonId; + partial void OnPersonIdChanging(global::System.Nullable value); + partial void OnPersonIdChanged(); /// - /// There are no comments for Property Duration in the schema. + /// There are no comments for Property ShareId in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Duration")] - public global::System.TimeSpan Duration + [global::Microsoft.OData.Client.OriginalNameAttribute("ShareId")] + public global::System.Guid ShareId { get { - return this._Duration; + return this._ShareId; } set { - this.OnDurationChanging(value); - this._Duration = value; - this.OnDurationChanged(); - this.OnPropertyChanged("Duration"); + this.OnShareIdChanging(value); + this._ShareId = value; + this.OnShareIdChanged(); + this.OnPropertyChanged("ShareId"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::System.TimeSpan _Duration; - partial void OnDurationChanging(global::System.TimeSpan value); - partial void OnDurationChanged(); + private global::System.Guid _ShareId; + partial void OnShareIdChanging(global::System.Guid value); + partial void OnShareIdChanged(); /// - /// There are no comments for Property SeatNumber in the schema. + /// There are no comments for Property Name in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("SeatNumber")] - public string SeatNumber + [global::Microsoft.OData.Client.OriginalNameAttribute("Name")] + public string Name { get { - return this._SeatNumber; + return this._Name; } set { - this.OnSeatNumberChanging(value); - this._SeatNumber = value; - this.OnSeatNumberChanged(); - this.OnPropertyChanged("SeatNumber"); + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private string _SeatNumber; - partial void OnSeatNumberChanging(string value); - partial void OnSeatNumberChanged(); + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); /// - /// There are no comments for Property FlightNumber in the schema. + /// There are no comments for Property Budget in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("FlightNumber")] - public string FlightNumber + [global::Microsoft.OData.Client.OriginalNameAttribute("Budget")] + public float Budget { get { - return this._FlightNumber; + return this._Budget; } set { - this.OnFlightNumberChanging(value); - this._FlightNumber = value; - this.OnFlightNumberChanged(); - this.OnPropertyChanged("FlightNumber"); + this.OnBudgetChanging(value); + this._Budget = value; + this.OnBudgetChanged(); + this.OnPropertyChanged("Budget"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private string _FlightNumber; - partial void OnFlightNumberChanging(string value); - partial void OnFlightNumberChanged(); + private float _Budget; + partial void OnBudgetChanging(float value); + partial void OnBudgetChanged(); /// - /// There are no comments for Property FromId in the schema. + /// There are no comments for Property Description in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("FromId")] - public string FromId + [global::Microsoft.OData.Client.OriginalNameAttribute("Description")] + public string Description { get { - return this._FromId; + return this._Description; } set { - this.OnFromIdChanging(value); - this._FromId = value; - this.OnFromIdChanged(); - this.OnPropertyChanged("FromId"); + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private string _FromId; - partial void OnFromIdChanging(string value); - partial void OnFromIdChanged(); + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); /// - /// There are no comments for Property ToId in the schema. + /// There are no comments for Property StartsAt in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("ToId")] - public string ToId + [global::Microsoft.OData.Client.OriginalNameAttribute("StartsAt")] + public global::System.DateTimeOffset StartsAt { get { - return this._ToId; + return this._StartsAt; } set { - this.OnToIdChanging(value); - this._ToId = value; - this.OnToIdChanged(); - this.OnPropertyChanged("ToId"); + this.OnStartsAtChanging(value); + this._StartsAt = value; + this.OnStartsAtChanged(); + this.OnPropertyChanged("StartsAt"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private string _ToId; - partial void OnToIdChanging(string value); - partial void OnToIdChanged(); + private global::System.DateTimeOffset _StartsAt; + partial void OnStartsAtChanging(global::System.DateTimeOffset value); + partial void OnStartsAtChanged(); /// - /// There are no comments for Property AirlineId in the schema. + /// There are no comments for Property EndsAt in the schema. /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("AirlineId")] - public string AirlineId + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("EndsAt")] + public global::System.DateTimeOffset EndsAt { get { - return this._AirlineId; + return this._EndsAt; } set { - this.OnAirlineIdChanging(value); - this._AirlineId = value; - this.OnAirlineIdChanged(); - this.OnPropertyChanged("AirlineId"); + this.OnEndsAtChanging(value); + this._EndsAt = value; + this.OnEndsAtChanged(); + this.OnPropertyChanged("EndsAt"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private string _AirlineId; - partial void OnAirlineIdChanging(string value); - partial void OnAirlineIdChanged(); + private global::System.DateTimeOffset _EndsAt; + partial void OnEndsAtChanging(global::System.DateTimeOffset value); + partial void OnEndsAtChanged(); /// - /// There are no comments for Property From in the schema. + /// There are no comments for Property LastUpdated in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("From")] - public global::Microsoft.OData.Service.Sample.Trippin.Models.Airport From + [global::Microsoft.OData.Client.OriginalNameAttribute("LastUpdated")] + public global::System.DateTimeOffset LastUpdated { get { - return this._From; + return this._LastUpdated; } set { - this.OnFromChanging(value); - this._From = value; - this.OnFromChanged(); - this.OnPropertyChanged("From"); + this.OnLastUpdatedChanging(value); + this._LastUpdated = value; + this.OnLastUpdatedChanged(); + this.OnPropertyChanged("LastUpdated"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Service.Sample.Trippin.Models.Airport _From; - partial void OnFromChanging(global::Microsoft.OData.Service.Sample.Trippin.Models.Airport value); - partial void OnFromChanged(); + private global::System.DateTimeOffset _LastUpdated; + partial void OnLastUpdatedChanging(global::System.DateTimeOffset value); + partial void OnLastUpdatedChanged(); /// - /// There are no comments for Property To in the schema. + /// There are no comments for Property Flights in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("To")] - public global::Microsoft.OData.Service.Sample.Trippin.Models.Airport To + [global::Microsoft.OData.Client.OriginalNameAttribute("Flights")] + public global::Microsoft.OData.Client.DataServiceCollection Flights { get { - return this._To; + return this._Flights; } set { - this.OnToChanging(value); - this._To = value; - this.OnToChanged(); - this.OnPropertyChanged("To"); + this.OnFlightsChanging(value); + this._Flights = value; + this.OnFlightsChanged(); + this.OnPropertyChanged("Flights"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Service.Sample.Trippin.Models.Airport _To; - partial void OnToChanging(global::Microsoft.OData.Service.Sample.Trippin.Models.Airport value); - partial void OnToChanged(); + private global::Microsoft.OData.Client.DataServiceCollection _Flights = new global::Microsoft.OData.Client.DataServiceCollection(null, global::Microsoft.OData.Client.TrackingMode.None); + partial void OnFlightsChanging(global::Microsoft.OData.Client.DataServiceCollection value); + partial void OnFlightsChanged(); /// - /// There are no comments for Property Airline in the schema. + /// There are no comments for Property Events in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Airline")] - public global::Microsoft.OData.Service.Sample.Trippin.Models.Airline Airline + [global::Microsoft.OData.Client.OriginalNameAttribute("Events")] + public global::Microsoft.OData.Client.DataServiceCollection Events { get { - return this._Airline; + return this._Events; } set { - this.OnAirlineChanging(value); - this._Airline = value; - this.OnAirlineChanged(); - this.OnPropertyChanged("Airline"); + this.OnEventsChanging(value); + this._Events = value; + this.OnEventsChanged(); + this.OnPropertyChanged("Events"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Service.Sample.Trippin.Models.Airline _Airline; - partial void OnAirlineChanging(global::Microsoft.OData.Service.Sample.Trippin.Models.Airline value); - partial void OnAirlineChanged(); + private global::Microsoft.OData.Client.DataServiceCollection _Events = new global::Microsoft.OData.Client.DataServiceCollection(null, global::Microsoft.OData.Client.TrackingMode.None); + partial void OnEventsChanging(global::Microsoft.OData.Client.DataServiceCollection value); + partial void OnEventsChanged(); /// /// This event is raised when the value of the property is changed /// @@ -1945,388 +3595,270 @@ protected virtual void OnPropertyChanged(string property) this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); } } - } - /// - /// There are no comments for TripSingle in the schema. - /// - [global::Microsoft.OData.Client.OriginalNameAttribute("TripSingle")] - public partial class TripSingle : global::Microsoft.OData.Client.DataServiceQuerySingle - { - /// - /// Initialize a new TripSingle object. - /// - public TripSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) - : base(context, path) {} - - /// - /// Initialize a new TripSingle object. - /// - public TripSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) - : base(context, path, isComposable) {} - /// - /// Initialize a new TripSingle object. - /// - public TripSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) - : base(query) {} - - /// - /// There are no comments for Flights in the schema. + /// There are no comments for EndTrip in the schema. /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Flights")] - public global::Microsoft.OData.Client.DataServiceQuery Flights + [global::Microsoft.OData.Client.OriginalNameAttribute("EndTrip")] + public global::Microsoft.OData.Client.DataServiceActionQuerySingle EndTrip() { - get + global::Microsoft.OData.Client.EntityDescriptor resource = Context.EntityTracker.TryGetEntityDescriptor(this); + if (resource == null) { - if (!this.IsComposable) - { - throw new global::System.NotSupportedException("The previous function is not composable."); - } - if ((this._Flights == null)) - { - this._Flights = Context.CreateQuery(GetPath("Flights")); - } - return this._Flights; + throw new global::System.Exception("cannot find entity"); } + + return new global::Microsoft.OData.Client.DataServiceActionQuerySingle(this.Context, resource.EditLink.OriginalString.Trim('/') + "/Microsoft.OData.Service.Sample.Trippin.Models.EndTrip"); } - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Client.DataServiceQuery _Flights; /// - /// There are no comments for Events in the schema. + /// There are no comments for EndTripWithPara in the schema. /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Events")] - public global::Microsoft.OData.Client.DataServiceQuery Events + [global::Microsoft.OData.Client.OriginalNameAttribute("EndTripWithPara")] + public global::Microsoft.OData.Client.DataServiceActionQuerySingle EndTripWithPara(int id, global::Microsoft.OData.Service.Sample.Trippin.Models.Location location, global::System.Nullable feature) { - get + global::Microsoft.OData.Client.EntityDescriptor resource = Context.EntityTracker.TryGetEntityDescriptor(this); + if (resource == null) { - if (!this.IsComposable) - { - throw new global::System.NotSupportedException("The previous function is not composable."); - } - if ((this._Events == null)) - { - this._Events = Context.CreateQuery(GetPath("Events")); - } - return this._Events; + throw new global::System.Exception("cannot find entity"); } + + return new global::Microsoft.OData.Client.DataServiceActionQuerySingle(this.Context, resource.EditLink.OriginalString.Trim('/') + "/Microsoft.OData.Service.Sample.Trippin.Models.EndTripWithPara", new global::Microsoft.OData.Client.BodyOperationParameter("id", id), + new global::Microsoft.OData.Client.BodyOperationParameter("location", location), + new global::Microsoft.OData.Client.BodyOperationParameter("feature", feature)); } - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Client.DataServiceQuery _Events; } /// - /// There are no comments for Trip in the schema. + /// There are no comments for StaffSingle in the schema. /// - /// - /// TripId - /// - [global::Microsoft.OData.Client.Key("TripId")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Trip")] - public partial class Trip : global::Microsoft.OData.Client.BaseEntityType, global::System.ComponentModel.INotifyPropertyChanged + [global::Microsoft.OData.Client.OriginalNameAttribute("StaffSingle")] + public partial class StaffSingle : global::Microsoft.OData.Client.DataServiceQuerySingle { /// - /// Create a new Trip object. - /// - /// Initial value of TripId. - /// Initial value of ShareId. - /// Initial value of Budget. - /// Initial value of StartsAt. - /// Initial value of EndsAt. - /// Initial value of LastUpdated. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - public static Trip CreateTrip(int tripId, - global::System.Guid shareId, - float budget, - global::System.DateTimeOffset startsAt, - global::System.DateTimeOffset endsAt, - global::System.DateTimeOffset lastUpdated) - { - Trip trip = new Trip(); - trip.TripId = tripId; - trip.ShareId = shareId; - trip.Budget = budget; - trip.StartsAt = startsAt; - trip.EndsAt = endsAt; - trip.LastUpdated = lastUpdated; - return trip; - } - /// - /// There are no comments for Property TripId in the schema. + /// Initialize a new StaffSingle object. /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("TripId")] - public int TripId - { - get - { - return this._TripId; - } - set - { - this.OnTripIdChanging(value); - this._TripId = value; - this.OnTripIdChanged(); - this.OnPropertyChanged("TripId"); - } - } - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private int _TripId; - partial void OnTripIdChanging(int value); - partial void OnTripIdChanged(); + public StaffSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) + : base(context, path) {} + /// - /// There are no comments for Property TrackGuid in the schema. + /// Initialize a new StaffSingle object. /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("TrackGuid")] - public global::System.Nullable TrackGuid - { - get - { - return this._TrackGuid; - } - set - { - this.OnTrackGuidChanging(value); - this._TrackGuid = value; - this.OnTrackGuidChanged(); - this.OnPropertyChanged("TrackGuid"); - } - } - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::System.Nullable _TrackGuid; - partial void OnTrackGuidChanging(global::System.Nullable value); - partial void OnTrackGuidChanged(); + public StaffSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) + : base(context, path, isComposable) {} + /// - /// There are no comments for Property PersonId in the schema. + /// Initialize a new StaffSingle object. /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("PersonId")] - public global::System.Nullable PersonId - { - get - { - return this._PersonId; - } - set - { - this.OnPersonIdChanging(value); - this._PersonId = value; - this.OnPersonIdChanged(); - this.OnPropertyChanged("PersonId"); - } - } - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::System.Nullable _PersonId; - partial void OnPersonIdChanging(global::System.Nullable value); - partial void OnPersonIdChanged(); + public StaffSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) + : base(query) {} + /// - /// There are no comments for Property ShareId in the schema. + /// There are no comments for PeerStaffs in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("ShareId")] - public global::System.Guid ShareId + [global::Microsoft.OData.Client.OriginalNameAttribute("PeerStaffs")] + public global::Microsoft.OData.Client.DataServiceQuery PeerStaffs { get { - return this._ShareId; - } - set - { - this.OnShareIdChanging(value); - this._ShareId = value; - this.OnShareIdChanged(); - this.OnPropertyChanged("ShareId"); + if (!this.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + if ((this._PeerStaffs == null)) + { + this._PeerStaffs = Context.CreateQuery(GetPath("PeerStaffs")); + } + return this._PeerStaffs; } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::System.Guid _ShareId; - partial void OnShareIdChanging(global::System.Guid value); - partial void OnShareIdChanged(); + private global::Microsoft.OData.Client.DataServiceQuery _PeerStaffs; /// - /// There are no comments for Property Name in the schema. + /// There are no comments for Conferences in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Name")] - public string Name + [global::Microsoft.OData.Client.OriginalNameAttribute("Conferences")] + public global::Microsoft.OData.Client.DataServiceQuery Conferences { get { - return this._Name; - } - set - { - this.OnNameChanging(value); - this._Name = value; - this.OnNameChanged(); - this.OnPropertyChanged("Name"); + if (!this.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + if ((this._Conferences == null)) + { + this._Conferences = Context.CreateQuery(GetPath("Conferences")); + } + return this._Conferences; } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private string _Name; - partial void OnNameChanging(string value); - partial void OnNameChanged(); + private global::Microsoft.OData.Client.DataServiceQuery _Conferences; + } + /// + /// There are no comments for Staff in the schema. + /// + /// + /// StaffId + /// + [global::Microsoft.OData.Client.Key("StaffId")] + [global::Microsoft.OData.Client.EntitySet("Staffs")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Staff")] + public partial class Staff : global::Microsoft.OData.Client.BaseEntityType, global::System.ComponentModel.INotifyPropertyChanged + { /// - /// There are no comments for Property Budget in the schema. + /// Create a new Staff object. /// + /// Initial value of StaffId. + /// Initial value of FirstName. + /// Initial value of YearOfService. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Budget")] - public float Budget + public static Staff CreateStaff(int staffId, string firstName, int yearOfService) { - get - { - return this._Budget; - } - set - { - this.OnBudgetChanging(value); - this._Budget = value; - this.OnBudgetChanged(); - this.OnPropertyChanged("Budget"); - } + Staff staff = new Staff(); + staff.StaffId = staffId; + staff.FirstName = firstName; + staff.YearOfService = yearOfService; + return staff; } - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private float _Budget; - partial void OnBudgetChanging(float value); - partial void OnBudgetChanged(); /// - /// There are no comments for Property Description in the schema. + /// There are no comments for Property StaffId in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Description")] - public string Description + [global::Microsoft.OData.Client.OriginalNameAttribute("StaffId")] + public int StaffId { get { - return this._Description; + return this._StaffId; } set { - this.OnDescriptionChanging(value); - this._Description = value; - this.OnDescriptionChanged(); - this.OnPropertyChanged("Description"); + this.OnStaffIdChanging(value); + this._StaffId = value; + this.OnStaffIdChanged(); + this.OnPropertyChanged("StaffId"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private string _Description; - partial void OnDescriptionChanging(string value); - partial void OnDescriptionChanged(); + private int _StaffId; + partial void OnStaffIdChanging(int value); + partial void OnStaffIdChanged(); /// - /// There are no comments for Property StartsAt in the schema. + /// There are no comments for Property UserName in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("StartsAt")] - public global::System.DateTimeOffset StartsAt + [global::Microsoft.OData.Client.OriginalNameAttribute("UserName")] + public string UserName { get { - return this._StartsAt; + return this._UserName; } set { - this.OnStartsAtChanging(value); - this._StartsAt = value; - this.OnStartsAtChanged(); - this.OnPropertyChanged("StartsAt"); + this.OnUserNameChanging(value); + this._UserName = value; + this.OnUserNameChanged(); + this.OnPropertyChanged("UserName"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::System.DateTimeOffset _StartsAt; - partial void OnStartsAtChanging(global::System.DateTimeOffset value); - partial void OnStartsAtChanged(); + private string _UserName; + partial void OnUserNameChanging(string value); + partial void OnUserNameChanged(); /// - /// There are no comments for Property EndsAt in the schema. + /// There are no comments for Property FirstName in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("EndsAt")] - public global::System.DateTimeOffset EndsAt + [global::Microsoft.OData.Client.OriginalNameAttribute("FirstName")] + public string FirstName { get { - return this._EndsAt; + return this._FirstName; } set { - this.OnEndsAtChanging(value); - this._EndsAt = value; - this.OnEndsAtChanged(); - this.OnPropertyChanged("EndsAt"); + this.OnFirstNameChanging(value); + this._FirstName = value; + this.OnFirstNameChanged(); + this.OnPropertyChanged("FirstName"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::System.DateTimeOffset _EndsAt; - partial void OnEndsAtChanging(global::System.DateTimeOffset value); - partial void OnEndsAtChanged(); + private string _FirstName; + partial void OnFirstNameChanging(string value); + partial void OnFirstNameChanged(); /// - /// There are no comments for Property LastUpdated in the schema. + /// There are no comments for Property YearOfService in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("LastUpdated")] - public global::System.DateTimeOffset LastUpdated + [global::Microsoft.OData.Client.OriginalNameAttribute("YearOfService")] + public int YearOfService { get { - return this._LastUpdated; + return this._YearOfService; } set { - this.OnLastUpdatedChanging(value); - this._LastUpdated = value; - this.OnLastUpdatedChanged(); - this.OnPropertyChanged("LastUpdated"); + this.OnYearOfServiceChanging(value); + this._YearOfService = value; + this.OnYearOfServiceChanged(); + this.OnPropertyChanged("YearOfService"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::System.DateTimeOffset _LastUpdated; - partial void OnLastUpdatedChanging(global::System.DateTimeOffset value); - partial void OnLastUpdatedChanged(); + private int _YearOfService; + partial void OnYearOfServiceChanging(int value); + partial void OnYearOfServiceChanged(); /// - /// There are no comments for Property Flights in the schema. + /// There are no comments for Property PeerStaffs in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Flights")] - public global::Microsoft.OData.Client.DataServiceCollection Flights + [global::Microsoft.OData.Client.OriginalNameAttribute("PeerStaffs")] + public global::Microsoft.OData.Client.DataServiceCollection PeerStaffs { get { - return this._Flights; + return this._PeerStaffs; } set { - this.OnFlightsChanging(value); - this._Flights = value; - this.OnFlightsChanged(); - this.OnPropertyChanged("Flights"); + this.OnPeerStaffsChanging(value); + this._PeerStaffs = value; + this.OnPeerStaffsChanged(); + this.OnPropertyChanged("PeerStaffs"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Client.DataServiceCollection _Flights = new global::Microsoft.OData.Client.DataServiceCollection(null, global::Microsoft.OData.Client.TrackingMode.None); - partial void OnFlightsChanging(global::Microsoft.OData.Client.DataServiceCollection value); - partial void OnFlightsChanged(); + private global::Microsoft.OData.Client.DataServiceCollection _PeerStaffs = new global::Microsoft.OData.Client.DataServiceCollection(null, global::Microsoft.OData.Client.TrackingMode.None); + partial void OnPeerStaffsChanging(global::Microsoft.OData.Client.DataServiceCollection value); + partial void OnPeerStaffsChanged(); /// - /// There are no comments for Property Events in the schema. + /// There are no comments for Property Conferences in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Events")] - public global::Microsoft.OData.Client.DataServiceCollection Events + [global::Microsoft.OData.Client.OriginalNameAttribute("Conferences")] + public global::Microsoft.OData.Client.DataServiceCollection Conferences { get { - return this._Events; + return this._Conferences; } set { - this.OnEventsChanging(value); - this._Events = value; - this.OnEventsChanged(); - this.OnPropertyChanged("Events"); + this.OnConferencesChanging(value); + this._Conferences = value; + this.OnConferencesChanged(); + this.OnPropertyChanged("Conferences"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Client.DataServiceCollection _Events = new global::Microsoft.OData.Client.DataServiceCollection(null, global::Microsoft.OData.Client.TrackingMode.None); - partial void OnEventsChanging(global::Microsoft.OData.Client.DataServiceCollection value); - partial void OnEventsChanged(); + private global::Microsoft.OData.Client.DataServiceCollection _Conferences = new global::Microsoft.OData.Client.DataServiceCollection(null, global::Microsoft.OData.Client.TrackingMode.None); + partial void OnConferencesChanging(global::Microsoft.OData.Client.DataServiceCollection value); + partial void OnConferencesChanged(); /// /// This event is raised when the value of the property is changed /// @@ -2344,136 +3876,249 @@ protected virtual void OnPropertyChanged(string property) this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); } } + } + /// + /// There are no comments for GlodSponsorSingle in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GlodSponsorSingle")] + public partial class GlodSponsorSingle : global::Microsoft.OData.Client.DataServiceQuerySingle + { /// - /// There are no comments for EndTrip in the schema. + /// Initialize a new GlodSponsorSingle object. /// - [global::Microsoft.OData.Client.OriginalNameAttribute("EndTrip")] - public global::Microsoft.OData.Client.DataServiceActionQuerySingle EndTrip() + public GlodSponsorSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) + : base(context, path) {} + + /// + /// Initialize a new GlodSponsorSingle object. + /// + public GlodSponsorSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) + : base(context, path, isComposable) {} + + /// + /// Initialize a new GlodSponsorSingle object. + /// + public GlodSponsorSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) + : base(query) {} + + } + /// + /// There are no comments for GlodSponsor in the schema. + /// + /// + /// SponsorId + /// + [global::Microsoft.OData.Client.Key("SponsorId")] + [global::Microsoft.OData.Client.OriginalNameAttribute("GlodSponsor")] + public partial class GlodSponsor : Sponsor + { + /// + /// Create a new GlodSponsor object. + /// + /// Initial value of SponsorId. + /// Initial value of Funding. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public static GlodSponsor CreateGlodSponsor(int sponsorId, int funding) { - global::Microsoft.OData.Client.EntityDescriptor resource = Context.EntityTracker.TryGetEntityDescriptor(this); - if (resource == null) + GlodSponsor glodSponsor = new GlodSponsor(); + glodSponsor.SponsorId = sponsorId; + glodSponsor.Funding = funding; + return glodSponsor; + } + /// + /// There are no comments for Property Funding in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Funding")] + public int Funding + { + get { - throw new global::System.Exception("cannot find entity"); + return this._Funding; + } + set + { + this.OnFundingChanging(value); + this._Funding = value; + this.OnFundingChanged(); + this.OnPropertyChanged("Funding"); } - - return new global::Microsoft.OData.Client.DataServiceActionQuerySingle(this.Context, resource.EditLink.OriginalString.Trim('/') + "/Microsoft.OData.Service.Sample.Trippin.Models.EndTrip"); } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private int _Funding; + partial void OnFundingChanging(int value); + partial void OnFundingChanged(); } /// - /// There are no comments for EventSingle in the schema. + /// There are no comments for HighEndConferenceSingle in the schema. /// - [global::Microsoft.OData.Client.OriginalNameAttribute("EventSingle")] - public partial class EventSingle : global::Microsoft.OData.Client.DataServiceQuerySingle + [global::Microsoft.OData.Client.OriginalNameAttribute("HighEndConferenceSingle")] + public partial class HighEndConferenceSingle : global::Microsoft.OData.Client.DataServiceQuerySingle { /// - /// Initialize a new EventSingle object. + /// Initialize a new HighEndConferenceSingle object. /// - public EventSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) + public HighEndConferenceSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) : base(context, path) {} /// - /// Initialize a new EventSingle object. + /// Initialize a new HighEndConferenceSingle object. /// - public EventSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) + public HighEndConferenceSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) : base(context, path, isComposable) {} /// - /// Initialize a new EventSingle object. + /// Initialize a new HighEndConferenceSingle object. /// - public EventSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) + public HighEndConferenceSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) : base(query) {} + /// + /// There are no comments for GlodSponsors in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("GlodSponsors")] + public global::Microsoft.OData.Client.DataServiceQuery GlodSponsors + { + get + { + if (!this.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + if ((this._GlodSponsors == null)) + { + this._GlodSponsors = Context.CreateQuery(GetPath("GlodSponsors")); + } + return this._GlodSponsors; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Client.DataServiceQuery _GlodSponsors; + /// + /// There are no comments for Sponsors in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Sponsors")] + public global::Microsoft.OData.Client.DataServiceQuery Sponsors + { + get + { + if (!this.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + if ((this._Sponsors == null)) + { + this._Sponsors = Context.CreateQuery(GetPath("Sponsors")); + } + return this._Sponsors; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Client.DataServiceQuery _Sponsors; } /// - /// There are no comments for Event in the schema. + /// There are no comments for HighEndConference in the schema. /// /// - /// Id + /// ConferenceId /// - [global::Microsoft.OData.Client.Key("Id")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Event")] - public partial class Event : global::Microsoft.OData.Client.BaseEntityType, global::System.ComponentModel.INotifyPropertyChanged + [global::Microsoft.OData.Client.Key("ConferenceId")] + [global::Microsoft.OData.Client.OriginalNameAttribute("HighEndConference")] + public partial class HighEndConference : Conference { /// - /// Create a new Event object. + /// Create a new HighEndConference object. /// - /// Initial value of Id. + /// Initial value of ConferenceId. + /// Initial value of NumberOfAttendees. + /// Initial value of NumberofVips. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - public static Event CreateEvent(int ID) + public static HighEndConference CreateHighEndConference(int conferenceId, int numberOfAttendees, int numberofVips) { - Event @event = new Event(); - @event.Id = ID; - return @event; + HighEndConference highEndConference = new HighEndConference(); + highEndConference.ConferenceId = conferenceId; + highEndConference.NumberOfAttendees = numberOfAttendees; + highEndConference.NumberofVips = numberofVips; + return highEndConference; } /// - /// There are no comments for Property Id in the schema. + /// There are no comments for Property NumberofVips in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Id")] - public int Id + [global::Microsoft.OData.Client.OriginalNameAttribute("NumberofVips")] + public int NumberofVips { get { - return this._Id; + return this._NumberofVips; } set { - this.OnIdChanging(value); - this._Id = value; - this.OnIdChanged(); - this.OnPropertyChanged("Id"); + this.OnNumberofVipsChanging(value); + this._NumberofVips = value; + this.OnNumberofVipsChanged(); + this.OnPropertyChanged("NumberofVips"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private int _Id; - partial void OnIdChanging(int value); - partial void OnIdChanged(); + private int _NumberofVips; + partial void OnNumberofVipsChanging(int value); + partial void OnNumberofVipsChanged(); /// - /// There are no comments for Property OccursAt in the schema. + /// There are no comments for Property GlodSponsors in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("OccursAt")] - public global::Microsoft.OData.Service.Sample.Trippin.Models.Location OccursAt + [global::Microsoft.OData.Client.OriginalNameAttribute("GlodSponsors")] + public global::Microsoft.OData.Client.DataServiceCollection GlodSponsors { get { - return this._OccursAt; + return this._GlodSponsors; } set { - this.OnOccursAtChanging(value); - this._OccursAt = value; - this.OnOccursAtChanged(); - this.OnPropertyChanged("OccursAt"); + this.OnGlodSponsorsChanging(value); + this._GlodSponsors = value; + this.OnGlodSponsorsChanged(); + this.OnPropertyChanged("GlodSponsors"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Service.Sample.Trippin.Models.Location _OccursAt; - partial void OnOccursAtChanging(global::Microsoft.OData.Service.Sample.Trippin.Models.Location value); - partial void OnOccursAtChanged(); + private global::Microsoft.OData.Client.DataServiceCollection _GlodSponsors = new global::Microsoft.OData.Client.DataServiceCollection(null, global::Microsoft.OData.Client.TrackingMode.None); + partial void OnGlodSponsorsChanging(global::Microsoft.OData.Client.DataServiceCollection value); + partial void OnGlodSponsorsChanged(); + } + /// + /// There are no comments for Location in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("Location")] + public partial class Location : global::System.ComponentModel.INotifyPropertyChanged + { /// - /// There are no comments for Property Description in the schema. + /// There are no comments for Property Address in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Description")] - public string Description + [global::Microsoft.OData.Client.OriginalNameAttribute("Address")] + public string Address { get { - return this._Description; + return this._Address; } set { - this.OnDescriptionChanging(value); - this._Description = value; - this.OnDescriptionChanged(); - this.OnPropertyChanged("Description"); + this.OnAddressChanging(value); + this._Address = value; + this.OnAddressChanged(); + this.OnPropertyChanged("Address"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private string _Description; - partial void OnDescriptionChanging(string value); - partial void OnDescriptionChanged(); + private string _Address; + partial void OnAddressChanging(string value); + partial void OnAddressChanged(); /// /// This event is raised when the value of the property is changed /// @@ -2493,34 +4138,80 @@ protected virtual void OnPropertyChanged(string property) } } /// - /// There are no comments for Location in the schema. + /// There are no comments for OrderDetail in the schema. /// - [global::Microsoft.OData.Client.OriginalNameAttribute("Location")] - public partial class Location : global::System.ComponentModel.INotifyPropertyChanged + [global::Microsoft.OData.Client.OriginalNameAttribute("OrderDetail")] + public partial class OrderDetail : global::System.ComponentModel.INotifyPropertyChanged { /// - /// There are no comments for Property Address in the schema. + /// There are no comments for Property NormalProperty in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Address")] - public string Address + [global::Microsoft.OData.Client.OriginalNameAttribute("NormalProperty")] + public string NormalProperty { get { - return this._Address; + return this._NormalProperty; } set { - this.OnAddressChanging(value); - this._Address = value; - this.OnAddressChanged(); - this.OnPropertyChanged("Address"); + this.OnNormalPropertyChanging(value); + this._NormalProperty = value; + this.OnNormalPropertyChanged(); + this.OnPropertyChanged("NormalProperty"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private string _Address; - partial void OnAddressChanging(string value); - partial void OnAddressChanged(); + private string _NormalProperty; + partial void OnNormalPropertyChanging(string value); + partial void OnNormalPropertyChanged(); + /// + /// There are no comments for Property ComputedProperty in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("ComputedProperty")] + public string ComputedProperty + { + get + { + return this._ComputedProperty; + } + set + { + this.OnComputedPropertyChanging(value); + this._ComputedProperty = value; + this.OnComputedPropertyChanged(); + this.OnPropertyChanged("ComputedProperty"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private string _ComputedProperty; + partial void OnComputedPropertyChanging(string value); + partial void OnComputedPropertyChanged(); + /// + /// There are no comments for Property ImmutableProperty in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("ImmutableProperty")] + public string ImmutableProperty + { + get + { + return this._ImmutableProperty; + } + set + { + this.OnImmutablePropertyChanging(value); + this._ImmutableProperty = value; + this.OnImmutablePropertyChanged(); + this.OnPropertyChanged("ImmutableProperty"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private string _ImmutableProperty; + partial void OnImmutablePropertyChanging(string value); + partial void OnImmutablePropertyChanged(); /// /// This event is raised when the value of the property is changed /// @@ -2665,6 +4356,7 @@ public partial class Employee : Person /// /// Create a new Employee object. /// + /// Initial value of PersonId. /// Initial value of FirstName. /// Initial value of Concurrency. /// Initial value of BirthDate. @@ -2673,7 +4365,8 @@ public partial class Employee : Person /// Initial value of FavoriteFeature. /// Initial value of Cost. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - public static Employee CreateEmployee(string firstName, + public static Employee CreateEmployee(long personId, + string firstName, long concurrency, global::Microsoft.OData.Edm.Library.Date birthDate, global::Microsoft.OData.Edm.Library.TimeOfDay birthTime, @@ -2682,6 +4375,7 @@ public static Employee CreateEmployee(string firstName, long cost) { Employee employee = new Employee(); + employee.PersonId = personId; employee.FirstName = firstName; employee.Concurrency = concurrency; employee.BirthDate = birthDate; @@ -2864,6 +4558,7 @@ public partial class Manager : Person /// /// Create a new Manager object. /// + /// Initial value of PersonId. /// Initial value of FirstName. /// Initial value of Concurrency. /// Initial value of BirthDate. @@ -2872,145 +4567,486 @@ public partial class Manager : Person /// Initial value of FavoriteFeature. /// Initial value of Budget. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - public static Manager CreateManager(string firstName, - long concurrency, - global::Microsoft.OData.Edm.Library.Date birthDate, - global::Microsoft.OData.Edm.Library.TimeOfDay birthTime, - global::System.DateTimeOffset birthDateTime, - global::Microsoft.OData.Service.Sample.Trippin.Models.Feature favoriteFeature, - long budget) + public static Manager CreateManager(long personId, + string firstName, + long concurrency, + global::Microsoft.OData.Edm.Library.Date birthDate, + global::Microsoft.OData.Edm.Library.TimeOfDay birthTime, + global::System.DateTimeOffset birthDateTime, + global::Microsoft.OData.Service.Sample.Trippin.Models.Feature favoriteFeature, + long budget) + { + Manager manager = new Manager(); + manager.PersonId = personId; + manager.FirstName = firstName; + manager.Concurrency = concurrency; + manager.BirthDate = birthDate; + manager.BirthTime = birthTime; + manager.BirthDateTime = birthDateTime; + manager.FavoriteFeature = favoriteFeature; + manager.Budget = budget; + return manager; + } + /// + /// There are no comments for Property Budget in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Budget")] + public long Budget + { + get + { + return this._Budget; + } + set + { + this.OnBudgetChanging(value); + this._Budget = value; + this.OnBudgetChanged(); + this.OnPropertyChanged("Budget"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private long _Budget; + partial void OnBudgetChanging(long value); + partial void OnBudgetChanged(); + /// + /// There are no comments for Property BossOffice in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("BossOffice")] + public global::Microsoft.OData.Service.Sample.Trippin.Models.Location BossOffice + { + get + { + return this._BossOffice; + } + set + { + this.OnBossOfficeChanging(value); + this._BossOffice = value; + this.OnBossOfficeChanged(); + this.OnPropertyChanged("BossOffice"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Service.Sample.Trippin.Models.Location _BossOffice; + partial void OnBossOfficeChanging(global::Microsoft.OData.Service.Sample.Trippin.Models.Location value); + partial void OnBossOfficeChanged(); + /// + /// There are no comments for Property DirectReports in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("DirectReports")] + public global::Microsoft.OData.Client.DataServiceCollection DirectReports + { + get + { + return this._DirectReports; + } + set + { + this.OnDirectReportsChanging(value); + this._DirectReports = value; + this.OnDirectReportsChanged(); + this.OnPropertyChanged("DirectReports"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Client.DataServiceCollection _DirectReports = new global::Microsoft.OData.Client.DataServiceCollection(null, global::Microsoft.OData.Client.TrackingMode.None); + partial void OnDirectReportsChanging(global::Microsoft.OData.Client.DataServiceCollection value); + partial void OnDirectReportsChanged(); + } + /// + /// There are no comments for SeniorStaffSingle in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("SeniorStaffSingle")] + public partial class SeniorStaffSingle : global::Microsoft.OData.Client.DataServiceQuerySingle + { + /// + /// Initialize a new SeniorStaffSingle object. + /// + public SeniorStaffSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) + : base(context, path) {} + + /// + /// Initialize a new SeniorStaffSingle object. + /// + public SeniorStaffSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) + : base(context, path, isComposable) {} + + /// + /// Initialize a new SeniorStaffSingle object. + /// + public SeniorStaffSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) + : base(query) {} + + /// + /// There are no comments for PeerSeniorStaffs in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("PeerSeniorStaffs")] + public global::Microsoft.OData.Client.DataServiceQuery PeerSeniorStaffs + { + get + { + if (!this.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + if ((this._PeerSeniorStaffs == null)) + { + this._PeerSeniorStaffs = Context.CreateQuery(GetPath("PeerSeniorStaffs")); + } + return this._PeerSeniorStaffs; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Client.DataServiceQuery _PeerSeniorStaffs; + /// + /// There are no comments for HighEndConferences in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("HighEndConferences")] + public global::Microsoft.OData.Client.DataServiceQuery HighEndConferences + { + get + { + if (!this.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + if ((this._HighEndConferences == null)) + { + this._HighEndConferences = Context.CreateQuery(GetPath("HighEndConferences")); + } + return this._HighEndConferences; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Client.DataServiceQuery _HighEndConferences; + /// + /// There are no comments for PeerStaffs in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("PeerStaffs")] + public global::Microsoft.OData.Client.DataServiceQuery PeerStaffs + { + get + { + if (!this.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + if ((this._PeerStaffs == null)) + { + this._PeerStaffs = Context.CreateQuery(GetPath("PeerStaffs")); + } + return this._PeerStaffs; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Client.DataServiceQuery _PeerStaffs; + /// + /// There are no comments for Conferences in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Conferences")] + public global::Microsoft.OData.Client.DataServiceQuery Conferences + { + get + { + if (!this.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + if ((this._Conferences == null)) + { + this._Conferences = Context.CreateQuery(GetPath("Conferences")); + } + return this._Conferences; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private global::Microsoft.OData.Client.DataServiceQuery _Conferences; + } + /// + /// There are no comments for SeniorStaff in the schema. + /// + /// + /// StaffId + /// + [global::Microsoft.OData.Client.Key("StaffId")] + [global::Microsoft.OData.Client.OriginalNameAttribute("SeniorStaff")] + public partial class SeniorStaff : Staff + { + /// + /// Create a new SeniorStaff object. + /// + /// Initial value of StaffId. + /// Initial value of FirstName. + /// Initial value of YearOfService. + /// Initial value of SeniorLevel. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public static SeniorStaff CreateSeniorStaff(int staffId, string firstName, int yearOfService, int seniorLevel) + { + SeniorStaff seniorStaff = new SeniorStaff(); + seniorStaff.StaffId = staffId; + seniorStaff.FirstName = firstName; + seniorStaff.YearOfService = yearOfService; + seniorStaff.SeniorLevel = seniorLevel; + return seniorStaff; + } + /// + /// There are no comments for Property SeniorLevel in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("SeniorLevel")] + public int SeniorLevel + { + get + { + return this._SeniorLevel; + } + set + { + this.OnSeniorLevelChanging(value); + this._SeniorLevel = value; + this.OnSeniorLevelChanged(); + this.OnPropertyChanged("SeniorLevel"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private int _SeniorLevel; + partial void OnSeniorLevelChanging(int value); + partial void OnSeniorLevelChanged(); + /// + /// There are no comments for Property SeniorTitle in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("SeniorTitle")] + public string SeniorTitle { - Manager manager = new Manager(); - manager.FirstName = firstName; - manager.Concurrency = concurrency; - manager.BirthDate = birthDate; - manager.BirthTime = birthTime; - manager.BirthDateTime = birthDateTime; - manager.FavoriteFeature = favoriteFeature; - manager.Budget = budget; - return manager; + get + { + return this._SeniorTitle; + } + set + { + this.OnSeniorTitleChanging(value); + this._SeniorTitle = value; + this.OnSeniorTitleChanged(); + this.OnPropertyChanged("SeniorTitle"); + } } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private string _SeniorTitle; + partial void OnSeniorTitleChanging(string value); + partial void OnSeniorTitleChanged(); /// - /// There are no comments for Property Budget in the schema. + /// There are no comments for Property PeerSeniorStaffs in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Budget")] - public long Budget + [global::Microsoft.OData.Client.OriginalNameAttribute("PeerSeniorStaffs")] + public global::Microsoft.OData.Client.DataServiceCollection PeerSeniorStaffs { get { - return this._Budget; + return this._PeerSeniorStaffs; } set { - this.OnBudgetChanging(value); - this._Budget = value; - this.OnBudgetChanged(); - this.OnPropertyChanged("Budget"); + this.OnPeerSeniorStaffsChanging(value); + this._PeerSeniorStaffs = value; + this.OnPeerSeniorStaffsChanged(); + this.OnPropertyChanged("PeerSeniorStaffs"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private long _Budget; - partial void OnBudgetChanging(long value); - partial void OnBudgetChanged(); + private global::Microsoft.OData.Client.DataServiceCollection _PeerSeniorStaffs = new global::Microsoft.OData.Client.DataServiceCollection(null, global::Microsoft.OData.Client.TrackingMode.None); + partial void OnPeerSeniorStaffsChanging(global::Microsoft.OData.Client.DataServiceCollection value); + partial void OnPeerSeniorStaffsChanged(); /// - /// There are no comments for Property DirectReports in the schema. + /// There are no comments for Property HighEndConferences in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("DirectReports")] - public global::Microsoft.OData.Client.DataServiceCollection DirectReports + [global::Microsoft.OData.Client.OriginalNameAttribute("HighEndConferences")] + public global::Microsoft.OData.Client.DataServiceCollection HighEndConferences { get { - return this._DirectReports; + return this._HighEndConferences; } set { - this.OnDirectReportsChanging(value); - this._DirectReports = value; - this.OnDirectReportsChanged(); - this.OnPropertyChanged("DirectReports"); + this.OnHighEndConferencesChanging(value); + this._HighEndConferences = value; + this.OnHighEndConferencesChanged(); + this.OnPropertyChanged("HighEndConferences"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private global::Microsoft.OData.Client.DataServiceCollection _DirectReports = new global::Microsoft.OData.Client.DataServiceCollection(null, global::Microsoft.OData.Client.TrackingMode.None); - partial void OnDirectReportsChanging(global::Microsoft.OData.Client.DataServiceCollection value); - partial void OnDirectReportsChanged(); + private global::Microsoft.OData.Client.DataServiceCollection _HighEndConferences = new global::Microsoft.OData.Client.DataServiceCollection(null, global::Microsoft.OData.Client.TrackingMode.None); + partial void OnHighEndConferencesChanging(global::Microsoft.OData.Client.DataServiceCollection value); + partial void OnHighEndConferencesChanged(); } /// - /// There are no comments for SpecialOrderSingle in the schema. + /// There are no comments for PersonWithAgeSingle in the schema. /// - [global::Microsoft.OData.Client.OriginalNameAttribute("SpecialOrderSingle")] - public partial class SpecialOrderSingle : global::Microsoft.OData.Client.DataServiceQuerySingle + [global::Microsoft.OData.Client.OriginalNameAttribute("PersonWithAgeSingle")] + public partial class PersonWithAgeSingle : global::Microsoft.OData.Client.DataServiceQuerySingle { /// - /// Initialize a new SpecialOrderSingle object. + /// Initialize a new PersonWithAgeSingle object. /// - public SpecialOrderSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) + public PersonWithAgeSingle(global::Microsoft.OData.Client.DataServiceContext context, string path) : base(context, path) {} /// - /// Initialize a new SpecialOrderSingle object. + /// Initialize a new PersonWithAgeSingle object. /// - public SpecialOrderSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) + public PersonWithAgeSingle(global::Microsoft.OData.Client.DataServiceContext context, string path, bool isComposable) : base(context, path, isComposable) {} /// - /// Initialize a new SpecialOrderSingle object. + /// Initialize a new PersonWithAgeSingle object. /// - public SpecialOrderSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) + public PersonWithAgeSingle(global::Microsoft.OData.Client.DataServiceQuerySingle query) : base(query) {} } /// - /// There are no comments for SpecialOrder in the schema. + /// There are no comments for PersonWithAge in the schema. /// /// - /// PersonId - /// OrderId + /// Id /// - [global::Microsoft.OData.Client.Key("PersonId", "OrderId")] - [global::Microsoft.OData.Client.OriginalNameAttribute("SpecialOrder")] - public partial class SpecialOrder : Order + [global::Microsoft.OData.Client.Key("Id")] + [global::Microsoft.OData.Client.OriginalNameAttribute("PersonWithAge")] + public partial class PersonWithAge : global::Microsoft.OData.Client.BaseEntityType, global::System.ComponentModel.INotifyPropertyChanged { /// - /// Create a new SpecialOrder object. + /// Create a new PersonWithAge object. + /// + /// Initial value of Id. + /// Initial value of FirstName. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public static PersonWithAge CreatePersonWithAge(long ID, string firstName) + { + PersonWithAge personWithAge = new PersonWithAge(); + personWithAge.Id = ID; + personWithAge.FirstName = firstName; + return personWithAge; + } + /// + /// There are no comments for Property Id in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("Id")] + public long Id + { + get + { + return this._Id; + } + set + { + this.OnIdChanging(value); + this._Id = value; + this.OnIdChanged(); + this.OnPropertyChanged("Id"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private long _Id; + partial void OnIdChanging(long value); + partial void OnIdChanged(); + /// + /// There are no comments for Property UserName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + [global::Microsoft.OData.Client.OriginalNameAttribute("UserName")] + public string UserName + { + get + { + return this._UserName; + } + set + { + this.OnUserNameChanging(value); + this._UserName = value; + this.OnUserNameChanged(); + this.OnPropertyChanged("UserName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private string _UserName; + partial void OnUserNameChanging(string value); + partial void OnUserNameChanged(); + /// + /// There are no comments for Property FirstName in the schema. /// - /// Initial value of PersonId. - /// Initial value of OrderId. - /// Initial value of Price. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - public static SpecialOrder CreateSpecialOrder(int personId, int orderId, double price) + [global::Microsoft.OData.Client.OriginalNameAttribute("FirstName")] + public string FirstName { - SpecialOrder specialOrder = new SpecialOrder(); - specialOrder.PersonId = personId; - specialOrder.OrderId = orderId; - specialOrder.Price = price; - return specialOrder; + get + { + return this._FirstName; + } + set + { + this.OnFirstNameChanging(value); + this._FirstName = value; + this.OnFirstNameChanged(); + this.OnPropertyChanged("FirstName"); + } } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + private string _FirstName; + partial void OnFirstNameChanging(string value); + partial void OnFirstNameChanged(); /// - /// There are no comments for Property Tag in the schema. + /// There are no comments for Property LastName in the schema. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - [global::Microsoft.OData.Client.OriginalNameAttribute("Tag")] - public string Tag + [global::Microsoft.OData.Client.OriginalNameAttribute("LastName")] + public string LastName { get { - return this._Tag; + return this._LastName; } set { - this.OnTagChanging(value); - this._Tag = value; - this.OnTagChanged(); - this.OnPropertyChanged("Tag"); + this.OnLastNameChanging(value); + this._LastName = value; + this.OnLastNameChanged(); + this.OnPropertyChanged("LastName"); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] - private string _Tag; - partial void OnTagChanging(string value); - partial void OnTagChanged(); + private string _LastName; + partial void OnLastNameChanging(string value); + partial void OnLastNameChanged(); + /// + /// This event is raised when the value of the property is changed + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + /// + /// The value of the property is changed + /// + /// property name + [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)); + } + } } /// /// There are no comments for Feature in the schema. @@ -3033,27 +5069,142 @@ public enum Feature public static class ExtensionMethods { /// - /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Person as global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle specified by key from an entity set + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Airline as global::Microsoft.OData.Service.Sample.Trippin.Models.AirlineSingle specified by key from an entity set /// /// source entity set /// dictionary with the names and values of keys - public static global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.Dictionary keys) + public static global::Microsoft.OData.Service.Sample.Trippin.Models.AirlineSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.Dictionary keys) { - return new global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + return new global::Microsoft.OData.Service.Sample.Trippin.Models.AirlineSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); } /// - /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Person as global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle specified by key from an entity set + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Airline as global::Microsoft.OData.Service.Sample.Trippin.Models.AirlineSingle specified by key from an entity set /// /// source entity set - /// The value of personId - public static global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, - global::System.Nullable personId) + /// The value of airlineCode + public static global::Microsoft.OData.Service.Sample.Trippin.Models.AirlineSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, + string airlineCode) + { + global::System.Collections.Generic.Dictionary keys = new global::System.Collections.Generic.Dictionary + { + { "AirlineCode", airlineCode } + }; + return new global::Microsoft.OData.Service.Sample.Trippin.Models.AirlineSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + } + /// + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Airport as global::Microsoft.OData.Service.Sample.Trippin.Models.AirportSingle specified by key from an entity set + /// + /// source entity set + /// dictionary with the names and values of keys + public static global::Microsoft.OData.Service.Sample.Trippin.Models.AirportSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.Dictionary keys) + { + return new global::Microsoft.OData.Service.Sample.Trippin.Models.AirportSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + } + /// + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Airport as global::Microsoft.OData.Service.Sample.Trippin.Models.AirportSingle specified by key from an entity set + /// + /// source entity set + /// The value of icaoCode + public static global::Microsoft.OData.Service.Sample.Trippin.Models.AirportSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, + string icaoCode) + { + global::System.Collections.Generic.Dictionary keys = new global::System.Collections.Generic.Dictionary + { + { "IcaoCode", icaoCode } + }; + return new global::Microsoft.OData.Service.Sample.Trippin.Models.AirportSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + } + /// + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Conference as global::Microsoft.OData.Service.Sample.Trippin.Models.ConferenceSingle specified by key from an entity set + /// + /// source entity set + /// dictionary with the names and values of keys + public static global::Microsoft.OData.Service.Sample.Trippin.Models.ConferenceSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.Dictionary keys) + { + return new global::Microsoft.OData.Service.Sample.Trippin.Models.ConferenceSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + } + /// + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Conference as global::Microsoft.OData.Service.Sample.Trippin.Models.ConferenceSingle specified by key from an entity set + /// + /// source entity set + /// The value of conferenceId + public static global::Microsoft.OData.Service.Sample.Trippin.Models.ConferenceSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, + int conferenceId) + { + global::System.Collections.Generic.Dictionary keys = new global::System.Collections.Generic.Dictionary + { + { "ConferenceId", conferenceId } + }; + return new global::Microsoft.OData.Service.Sample.Trippin.Models.ConferenceSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + } + /// + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Sponsor as global::Microsoft.OData.Service.Sample.Trippin.Models.SponsorSingle specified by key from an entity set + /// + /// source entity set + /// dictionary with the names and values of keys + public static global::Microsoft.OData.Service.Sample.Trippin.Models.SponsorSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.Dictionary keys) + { + return new global::Microsoft.OData.Service.Sample.Trippin.Models.SponsorSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + } + /// + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Sponsor as global::Microsoft.OData.Service.Sample.Trippin.Models.SponsorSingle specified by key from an entity set + /// + /// source entity set + /// The value of sponsorId + public static global::Microsoft.OData.Service.Sample.Trippin.Models.SponsorSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, + int sponsorId) + { + global::System.Collections.Generic.Dictionary keys = new global::System.Collections.Generic.Dictionary + { + { "SponsorId", sponsorId } + }; + return new global::Microsoft.OData.Service.Sample.Trippin.Models.SponsorSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + } + /// + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Event as global::Microsoft.OData.Service.Sample.Trippin.Models.EventSingle specified by key from an entity set + /// + /// source entity set + /// dictionary with the names and values of keys + public static global::Microsoft.OData.Service.Sample.Trippin.Models.EventSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.Dictionary keys) + { + return new global::Microsoft.OData.Service.Sample.Trippin.Models.EventSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + } + /// + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Event as global::Microsoft.OData.Service.Sample.Trippin.Models.EventSingle specified by key from an entity set + /// + /// source entity set + /// The value of id + public static global::Microsoft.OData.Service.Sample.Trippin.Models.EventSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, + int id) + { + global::System.Collections.Generic.Dictionary keys = new global::System.Collections.Generic.Dictionary + { + { "Id", id } + }; + return new global::Microsoft.OData.Service.Sample.Trippin.Models.EventSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + } + /// + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Flight as global::Microsoft.OData.Service.Sample.Trippin.Models.FlightSingle specified by key from an entity set + /// + /// source entity set + /// dictionary with the names and values of keys + public static global::Microsoft.OData.Service.Sample.Trippin.Models.FlightSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.Dictionary keys) + { + return new global::Microsoft.OData.Service.Sample.Trippin.Models.FlightSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + } + /// + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Flight as global::Microsoft.OData.Service.Sample.Trippin.Models.FlightSingle specified by key from an entity set + /// + /// source entity set + /// The value of flightId + public static global::Microsoft.OData.Service.Sample.Trippin.Models.FlightSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, + int flightId) { global::System.Collections.Generic.Dictionary keys = new global::System.Collections.Generic.Dictionary { - { "PersonId", personId } + { "FlightId", flightId } }; - return new global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + return new global::Microsoft.OData.Service.Sample.Trippin.Models.FlightSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); } /// /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Order as global::Microsoft.OData.Service.Sample.Trippin.Models.OrderSingle specified by key from an entity set @@ -3082,119 +5233,137 @@ public static class ExtensionMethods return new global::Microsoft.OData.Service.Sample.Trippin.Models.OrderSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); } /// - /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Airport as global::Microsoft.OData.Service.Sample.Trippin.Models.AirportSingle specified by key from an entity set + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Person as global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle specified by key from an entity set /// /// source entity set /// dictionary with the names and values of keys - public static global::Microsoft.OData.Service.Sample.Trippin.Models.AirportSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.Dictionary keys) + public static global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.Dictionary keys) { - return new global::Microsoft.OData.Service.Sample.Trippin.Models.AirportSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + return new global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); } /// - /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Airport as global::Microsoft.OData.Service.Sample.Trippin.Models.AirportSingle specified by key from an entity set + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Person as global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle specified by key from an entity set /// /// source entity set - /// The value of icaoCode - public static global::Microsoft.OData.Service.Sample.Trippin.Models.AirportSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, - string icaoCode) + /// The value of personId + public static global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, + long personId) { global::System.Collections.Generic.Dictionary keys = new global::System.Collections.Generic.Dictionary { - { "IcaoCode", icaoCode } + { "PersonId", personId } }; - return new global::Microsoft.OData.Service.Sample.Trippin.Models.AirportSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + return new global::Microsoft.OData.Service.Sample.Trippin.Models.PersonSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); } /// - /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Airline as global::Microsoft.OData.Service.Sample.Trippin.Models.AirlineSingle specified by key from an entity set + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Trip as global::Microsoft.OData.Service.Sample.Trippin.Models.TripSingle specified by key from an entity set /// /// source entity set /// dictionary with the names and values of keys - public static global::Microsoft.OData.Service.Sample.Trippin.Models.AirlineSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.Dictionary keys) + public static global::Microsoft.OData.Service.Sample.Trippin.Models.TripSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.Dictionary keys) { - return new global::Microsoft.OData.Service.Sample.Trippin.Models.AirlineSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + return new global::Microsoft.OData.Service.Sample.Trippin.Models.TripSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); } /// - /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Airline as global::Microsoft.OData.Service.Sample.Trippin.Models.AirlineSingle specified by key from an entity set + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Trip as global::Microsoft.OData.Service.Sample.Trippin.Models.TripSingle specified by key from an entity set /// /// source entity set - /// The value of airlineCode - public static global::Microsoft.OData.Service.Sample.Trippin.Models.AirlineSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, - string airlineCode) + /// The value of tripId + public static global::Microsoft.OData.Service.Sample.Trippin.Models.TripSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, + int tripId) { global::System.Collections.Generic.Dictionary keys = new global::System.Collections.Generic.Dictionary { - { "AirlineCode", airlineCode } + { "TripId", tripId } }; - return new global::Microsoft.OData.Service.Sample.Trippin.Models.AirlineSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + return new global::Microsoft.OData.Service.Sample.Trippin.Models.TripSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); } /// - /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Flight as global::Microsoft.OData.Service.Sample.Trippin.Models.FlightSingle specified by key from an entity set + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Staff as global::Microsoft.OData.Service.Sample.Trippin.Models.StaffSingle specified by key from an entity set /// /// source entity set /// dictionary with the names and values of keys - public static global::Microsoft.OData.Service.Sample.Trippin.Models.FlightSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.Dictionary keys) + public static global::Microsoft.OData.Service.Sample.Trippin.Models.StaffSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.Dictionary keys) { - return new global::Microsoft.OData.Service.Sample.Trippin.Models.FlightSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + return new global::Microsoft.OData.Service.Sample.Trippin.Models.StaffSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); } /// - /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Flight as global::Microsoft.OData.Service.Sample.Trippin.Models.FlightSingle specified by key from an entity set + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Staff as global::Microsoft.OData.Service.Sample.Trippin.Models.StaffSingle specified by key from an entity set /// /// source entity set - /// The value of flightId - public static global::Microsoft.OData.Service.Sample.Trippin.Models.FlightSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, - int flightId) + /// The value of staffId + public static global::Microsoft.OData.Service.Sample.Trippin.Models.StaffSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, + int staffId) { global::System.Collections.Generic.Dictionary keys = new global::System.Collections.Generic.Dictionary { - { "FlightId", flightId } + { "StaffId", staffId } }; - return new global::Microsoft.OData.Service.Sample.Trippin.Models.FlightSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + return new global::Microsoft.OData.Service.Sample.Trippin.Models.StaffSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); } /// - /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Trip as global::Microsoft.OData.Service.Sample.Trippin.Models.TripSingle specified by key from an entity set + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.GlodSponsor as global::Microsoft.OData.Service.Sample.Trippin.Models.GlodSponsorSingle specified by key from an entity set /// /// source entity set /// dictionary with the names and values of keys - public static global::Microsoft.OData.Service.Sample.Trippin.Models.TripSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.Dictionary keys) + public static global::Microsoft.OData.Service.Sample.Trippin.Models.GlodSponsorSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.Dictionary keys) { - return new global::Microsoft.OData.Service.Sample.Trippin.Models.TripSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + return new global::Microsoft.OData.Service.Sample.Trippin.Models.GlodSponsorSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); } /// - /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Trip as global::Microsoft.OData.Service.Sample.Trippin.Models.TripSingle specified by key from an entity set + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.GlodSponsor as global::Microsoft.OData.Service.Sample.Trippin.Models.GlodSponsorSingle specified by key from an entity set /// /// source entity set - /// The value of tripId - public static global::Microsoft.OData.Service.Sample.Trippin.Models.TripSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, - int tripId) + /// The value of sponsorId + public static global::Microsoft.OData.Service.Sample.Trippin.Models.GlodSponsorSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, + int sponsorId) { global::System.Collections.Generic.Dictionary keys = new global::System.Collections.Generic.Dictionary { - { "TripId", tripId } + { "SponsorId", sponsorId } }; - return new global::Microsoft.OData.Service.Sample.Trippin.Models.TripSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + return new global::Microsoft.OData.Service.Sample.Trippin.Models.GlodSponsorSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); } /// - /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Event as global::Microsoft.OData.Service.Sample.Trippin.Models.EventSingle specified by key from an entity set + /// Cast an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Sponsor to its derived type global::Microsoft.OData.Service.Sample.Trippin.Models.GlodSponsor + /// + /// source entity + public static global::Microsoft.OData.Service.Sample.Trippin.Models.GlodSponsorSingle CastToGlodSponsor(this global::Microsoft.OData.Client.DataServiceQuerySingle source) + { + global::Microsoft.OData.Client.DataServiceQuerySingle query = source.CastTo(); + return new global::Microsoft.OData.Service.Sample.Trippin.Models.GlodSponsorSingle(source.Context, query.GetPath(null)); + } + /// + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.HighEndConference as global::Microsoft.OData.Service.Sample.Trippin.Models.HighEndConferenceSingle specified by key from an entity set /// /// source entity set /// dictionary with the names and values of keys - public static global::Microsoft.OData.Service.Sample.Trippin.Models.EventSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.Dictionary keys) + public static global::Microsoft.OData.Service.Sample.Trippin.Models.HighEndConferenceSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.Dictionary keys) { - return new global::Microsoft.OData.Service.Sample.Trippin.Models.EventSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + return new global::Microsoft.OData.Service.Sample.Trippin.Models.HighEndConferenceSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); } /// - /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Event as global::Microsoft.OData.Service.Sample.Trippin.Models.EventSingle specified by key from an entity set + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.HighEndConference as global::Microsoft.OData.Service.Sample.Trippin.Models.HighEndConferenceSingle specified by key from an entity set /// /// source entity set - /// The value of id - public static global::Microsoft.OData.Service.Sample.Trippin.Models.EventSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, - int id) + /// The value of conferenceId + public static global::Microsoft.OData.Service.Sample.Trippin.Models.HighEndConferenceSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, + int conferenceId) { global::System.Collections.Generic.Dictionary keys = new global::System.Collections.Generic.Dictionary { - { "Id", id } + { "ConferenceId", conferenceId } }; - return new global::Microsoft.OData.Service.Sample.Trippin.Models.EventSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + return new global::Microsoft.OData.Service.Sample.Trippin.Models.HighEndConferenceSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + } + /// + /// Cast an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Conference to its derived type global::Microsoft.OData.Service.Sample.Trippin.Models.HighEndConference + /// + /// source entity + public static global::Microsoft.OData.Service.Sample.Trippin.Models.HighEndConferenceSingle CastToHighEndConference(this global::Microsoft.OData.Client.DataServiceQuerySingle source) + { + global::Microsoft.OData.Client.DataServiceQuerySingle query = source.CastTo(); + return new global::Microsoft.OData.Service.Sample.Trippin.Models.HighEndConferenceSingle(source.Context, query.GetPath(null)); } /// /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Employee as global::Microsoft.OData.Service.Sample.Trippin.Models.EmployeeSingle specified by key from an entity set @@ -3211,7 +5380,7 @@ public static class ExtensionMethods /// source entity set /// The value of personId public static global::Microsoft.OData.Service.Sample.Trippin.Models.EmployeeSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, - global::System.Nullable personId) + long personId) { global::System.Collections.Generic.Dictionary keys = new global::System.Collections.Generic.Dictionary { @@ -3243,7 +5412,7 @@ public static class ExtensionMethods /// source entity set /// The value of personId public static global::Microsoft.OData.Service.Sample.Trippin.Models.ManagerSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, - global::System.Nullable personId) + long personId) { global::System.Collections.Generic.Dictionary keys = new global::System.Collections.Generic.Dictionary { @@ -3261,39 +5430,98 @@ public static class ExtensionMethods return new global::Microsoft.OData.Service.Sample.Trippin.Models.ManagerSingle(source.Context, query.GetPath(null)); } /// - /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.SpecialOrder as global::Microsoft.OData.Service.Sample.Trippin.Models.SpecialOrderSingle specified by key from an entity set + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.SeniorStaff as global::Microsoft.OData.Service.Sample.Trippin.Models.SeniorStaffSingle specified by key from an entity set /// /// source entity set /// dictionary with the names and values of keys - public static global::Microsoft.OData.Service.Sample.Trippin.Models.SpecialOrderSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.Dictionary keys) + public static global::Microsoft.OData.Service.Sample.Trippin.Models.SeniorStaffSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.Dictionary keys) { - return new global::Microsoft.OData.Service.Sample.Trippin.Models.SpecialOrderSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + return new global::Microsoft.OData.Service.Sample.Trippin.Models.SeniorStaffSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); } /// - /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.SpecialOrder as global::Microsoft.OData.Service.Sample.Trippin.Models.SpecialOrderSingle specified by key from an entity set + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.SeniorStaff as global::Microsoft.OData.Service.Sample.Trippin.Models.SeniorStaffSingle specified by key from an entity set /// /// source entity set - /// The value of personId - /// The value of orderId - public static global::Microsoft.OData.Service.Sample.Trippin.Models.SpecialOrderSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, - int personId, - int orderId) + /// The value of staffId + public static global::Microsoft.OData.Service.Sample.Trippin.Models.SeniorStaffSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, + int staffId) { global::System.Collections.Generic.Dictionary keys = new global::System.Collections.Generic.Dictionary { - { "PersonId", personId }, - { "OrderId", orderId } + { "StaffId", staffId } }; - return new global::Microsoft.OData.Service.Sample.Trippin.Models.SpecialOrderSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + return new global::Microsoft.OData.Service.Sample.Trippin.Models.SeniorStaffSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); } /// - /// Cast an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Order to its derived type global::Microsoft.OData.Service.Sample.Trippin.Models.SpecialOrder + /// Cast an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.Staff to its derived type global::Microsoft.OData.Service.Sample.Trippin.Models.SeniorStaff /// /// source entity - public static global::Microsoft.OData.Service.Sample.Trippin.Models.SpecialOrderSingle CastToSpecialOrder(this global::Microsoft.OData.Client.DataServiceQuerySingle source) + public static global::Microsoft.OData.Service.Sample.Trippin.Models.SeniorStaffSingle CastToSeniorStaff(this global::Microsoft.OData.Client.DataServiceQuerySingle source) + { + global::Microsoft.OData.Client.DataServiceQuerySingle query = source.CastTo(); + return new global::Microsoft.OData.Service.Sample.Trippin.Models.SeniorStaffSingle(source.Context, query.GetPath(null)); + } + /// + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.PersonWithAge as global::Microsoft.OData.Service.Sample.Trippin.Models.PersonWithAgeSingle specified by key from an entity set + /// + /// source entity set + /// dictionary with the names and values of keys + public static global::Microsoft.OData.Service.Sample.Trippin.Models.PersonWithAgeSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.Dictionary keys) + { + return new global::Microsoft.OData.Service.Sample.Trippin.Models.PersonWithAgeSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + } + /// + /// Get an entity of type global::Microsoft.OData.Service.Sample.Trippin.Models.PersonWithAge as global::Microsoft.OData.Service.Sample.Trippin.Models.PersonWithAgeSingle specified by key from an entity set + /// + /// source entity set + /// The value of id + public static global::Microsoft.OData.Service.Sample.Trippin.Models.PersonWithAgeSingle ByKey(this global::Microsoft.OData.Client.DataServiceQuery source, + long id) + { + global::System.Collections.Generic.Dictionary keys = new global::System.Collections.Generic.Dictionary + { + { "Id", id } + }; + return new global::Microsoft.OData.Service.Sample.Trippin.Models.PersonWithAgeSingle(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys))); + } + /// + /// There are no comments for GetPersonFriends in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetPersonFriends")] + public static global::Microsoft.OData.Client.DataServiceQuery GetPersonFriends(this global::Microsoft.OData.Client.DataServiceQuerySingle source) + { + if (!source.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + + return source.CreateFunctionQuery("Microsoft.OData.Service.Sample.Trippin.Models.GetPersonFriends", false); + } + /// + /// There are no comments for GetPersonFriends in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetPersonFriends")] + public static global::Microsoft.OData.Client.DataServiceQuery GetPersonFriends(this global::Microsoft.OData.Client.DataServiceQuerySingle source) + { + if (!source.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + + return source.CreateFunctionQuery("Microsoft.OData.Service.Sample.Trippin.Models.GetPersonFriends", false); + } + /// + /// There are no comments for GetPersonFriends in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetPersonFriends")] + public static global::Microsoft.OData.Client.DataServiceQuery GetPersonFriends(this global::Microsoft.OData.Client.DataServiceQuerySingle source) { - global::Microsoft.OData.Client.DataServiceQuerySingle query = source.CastTo(); - return new global::Microsoft.OData.Service.Sample.Trippin.Models.SpecialOrderSingle(source.Context, query.GetPath(null)); + if (!source.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + + return source.CreateFunctionQuery("Microsoft.OData.Service.Sample.Trippin.Models.GetPersonFriends", false); } /// /// There are no comments for GetNumberOfFriends in the schema. @@ -3335,6 +5563,142 @@ public static class ExtensionMethods return source.CreateFunctionQuerySingle("Microsoft.OData.Service.Sample.Trippin.Models.GetNumberOfFriends", false); } /// + /// There are no comments for GetBoundEntitySetIEnumerable in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetBoundEntitySetIEnumerable")] + public static global::Microsoft.OData.Client.DataServiceQuerySingle GetBoundEntitySetIEnumerable(this global::Microsoft.OData.Client.DataServiceQuery source, int n) + { + if (!source.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + + return source.CreateFunctionQuerySingle("Microsoft.OData.Service.Sample.Trippin.Models.GetBoundEntitySetIEnumerable", false, new global::Microsoft.OData.Client.UriOperationParameter("n", n)); + } + /// + /// There are no comments for GetBoundEntitySetIEnumerable in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetBoundEntitySetIEnumerable")] + public static global::Microsoft.OData.Client.DataServiceQuerySingle GetBoundEntitySetIEnumerable(this global::Microsoft.OData.Client.DataServiceQuery source, int n) + { + if (!source.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + + return source.CreateFunctionQuerySingle("Microsoft.OData.Service.Sample.Trippin.Models.GetBoundEntitySetIEnumerable", false, new global::Microsoft.OData.Client.UriOperationParameter("n", n)); + } + /// + /// There are no comments for GetBoundEntitySetIEnumerable in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetBoundEntitySetIEnumerable")] + public static global::Microsoft.OData.Client.DataServiceQuerySingle GetBoundEntitySetIEnumerable(this global::Microsoft.OData.Client.DataServiceQuery source, int n) + { + if (!source.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + + return source.CreateFunctionQuerySingle("Microsoft.OData.Service.Sample.Trippin.Models.GetBoundEntitySetIEnumerable", false, new global::Microsoft.OData.Client.UriOperationParameter("n", n)); + } + /// + /// There are no comments for GetBoundEntitySetICollection in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetBoundEntitySetICollection")] + public static global::Microsoft.OData.Client.DataServiceQuerySingle GetBoundEntitySetICollection(this global::Microsoft.OData.Client.DataServiceQuery source, int n, int m) + { + if (!source.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + + return source.CreateFunctionQuerySingle("Microsoft.OData.Service.Sample.Trippin.Models.GetBoundEntitySetICollection", false, new global::Microsoft.OData.Client.UriOperationParameter("n", n), + new global::Microsoft.OData.Client.UriOperationParameter("m", m)); + } + /// + /// There are no comments for GetBoundEntitySetICollection in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetBoundEntitySetICollection")] + public static global::Microsoft.OData.Client.DataServiceQuerySingle GetBoundEntitySetICollection(this global::Microsoft.OData.Client.DataServiceQuery source, int n, int m) + { + if (!source.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + + return source.CreateFunctionQuerySingle("Microsoft.OData.Service.Sample.Trippin.Models.GetBoundEntitySetICollection", false, new global::Microsoft.OData.Client.UriOperationParameter("n", n), + new global::Microsoft.OData.Client.UriOperationParameter("m", m)); + } + /// + /// There are no comments for GetBoundEntitySetICollection in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetBoundEntitySetICollection")] + public static global::Microsoft.OData.Client.DataServiceQuerySingle GetBoundEntitySetICollection(this global::Microsoft.OData.Client.DataServiceQuery source, int n, int m) + { + if (!source.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + + return source.CreateFunctionQuerySingle("Microsoft.OData.Service.Sample.Trippin.Models.GetBoundEntitySetICollection", false, new global::Microsoft.OData.Client.UriOperationParameter("n", n), + new global::Microsoft.OData.Client.UriOperationParameter("m", m)); + } + /// + /// There are no comments for GetBoundEntitySetArray in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetBoundEntitySetArray")] + public static global::Microsoft.OData.Client.DataServiceQuerySingle GetBoundEntitySetArray(this global::Microsoft.OData.Client.DataServiceQuery source, int n, int m) + { + if (!source.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + + return source.CreateFunctionQuerySingle("Microsoft.OData.Service.Sample.Trippin.Models.GetBoundEntitySetArray", false, new global::Microsoft.OData.Client.UriOperationParameter("n", n), + new global::Microsoft.OData.Client.UriOperationParameter("m", m)); + } + /// + /// There are no comments for GetBoundEntitySetArray in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetBoundEntitySetArray")] + public static global::Microsoft.OData.Client.DataServiceQuerySingle GetBoundEntitySetArray(this global::Microsoft.OData.Client.DataServiceQuery source, int n, int m) + { + if (!source.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + + return source.CreateFunctionQuerySingle("Microsoft.OData.Service.Sample.Trippin.Models.GetBoundEntitySetArray", false, new global::Microsoft.OData.Client.UriOperationParameter("n", n), + new global::Microsoft.OData.Client.UriOperationParameter("m", m)); + } + /// + /// There are no comments for GetBoundEntitySetArray in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetBoundEntitySetArray")] + public static global::Microsoft.OData.Client.DataServiceQuerySingle GetBoundEntitySetArray(this global::Microsoft.OData.Client.DataServiceQuery source, int n, int m) + { + if (!source.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + + return source.CreateFunctionQuerySingle("Microsoft.OData.Service.Sample.Trippin.Models.GetBoundEntitySetArray", false, new global::Microsoft.OData.Client.UriOperationParameter("n", n), + new global::Microsoft.OData.Client.UriOperationParameter("m", m)); + } + /// + /// There are no comments for GetBoundComplex in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("GetBoundComplex")] + public static global::Microsoft.OData.Client.DataServiceQuerySingle GetBoundComplex(this global::Microsoft.OData.Client.DataServiceQuerySingle source) + { + if (!source.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + + return source.CreateFunctionQuerySingle("Microsoft.OData.Service.Sample.Trippin.Models.GetBoundComplex", false); + } + /// /// There are no comments for EndTrip in the schema. /// [global::Microsoft.OData.Client.OriginalNameAttribute("EndTrip")] @@ -3347,5 +5711,68 @@ public static class ExtensionMethods return new global::Microsoft.OData.Client.DataServiceActionQuerySingle(source.Context, source.AppendRequestUri("Microsoft.OData.Service.Sample.Trippin.Models.EndTrip")); } + /// + /// There are no comments for EndTripWithPara in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("EndTripWithPara")] + public static global::Microsoft.OData.Client.DataServiceActionQuerySingle EndTripWithPara(this global::Microsoft.OData.Client.DataServiceQuerySingle source, int id, global::Microsoft.OData.Service.Sample.Trippin.Models.Location location, global::System.Nullable feature) + { + if (!source.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + + return new global::Microsoft.OData.Client.DataServiceActionQuerySingle(source.Context, source.AppendRequestUri("Microsoft.OData.Service.Sample.Trippin.Models.EndTripWithPara"), new global::Microsoft.OData.Client.BodyOperationParameter("id", id), + new global::Microsoft.OData.Client.BodyOperationParameter("location", location), + new global::Microsoft.OData.Client.BodyOperationParameter("feature", feature)); + } + /// + /// There are no comments for EndTripsIEnumerable in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("EndTripsIEnumerable")] + public static global::Microsoft.OData.Client.DataServiceActionQuery EndTripsIEnumerable(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.ICollection ids, global::System.Collections.Generic.ICollection locations, global::System.Collections.Generic.ICollection features) + { + if (!source.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + + return new global::Microsoft.OData.Client.DataServiceActionQuery(source.Context, source.AppendRequestUri("Microsoft.OData.Service.Sample.Trippin.Models.EndTripsIEnumerable"), new global::Microsoft.OData.Client.BodyOperationParameter("ids", ids), + new global::Microsoft.OData.Client.BodyOperationParameter("locations", locations), + new global::Microsoft.OData.Client.BodyOperationParameter("features", features)); + } + /// + /// There are no comments for EndTripsICollection in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("EndTripsICollection")] + public static global::Microsoft.OData.Client.DataServiceActionQuery EndTripsICollection(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.ICollection ids, global::System.Collections.Generic.ICollection locations, global::System.Collections.Generic.ICollection features) + { + if (!source.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + + return new global::Microsoft.OData.Client.DataServiceActionQuery(source.Context, source.AppendRequestUri("Microsoft.OData.Service.Sample.Trippin.Models.EndTripsICollection"), new global::Microsoft.OData.Client.BodyOperationParameter("ids", ids), + new global::Microsoft.OData.Client.BodyOperationParameter("locations", locations), + new global::Microsoft.OData.Client.BodyOperationParameter("features", features)); + } + /// + /// There are no comments for EndTripsArray in the schema. + /// + [global::Microsoft.OData.Client.OriginalNameAttribute("EndTripsArray")] + public static global::Microsoft.OData.Client.DataServiceActionQuery EndTripsArray(this global::Microsoft.OData.Client.DataServiceQuery source, global::System.Collections.Generic.ICollection ids, global::System.Collections.Generic.ICollection locations, global::System.Collections.Generic.ICollection features) + { + if (!source.IsComposable) + { + throw new global::System.NotSupportedException("The previous function is not composable."); + } + + return new global::Microsoft.OData.Client.DataServiceActionQuery(source.Context, source.AppendRequestUri("Microsoft.OData.Service.Sample.Trippin.Models.EndTripsArray"), new global::Microsoft.OData.Client.BodyOperationParameter("ids", ids), + new global::Microsoft.OData.Client.BodyOperationParameter("locations", locations), + new global::Microsoft.OData.Client.BodyOperationParameter("features", features)); + } } } +namespace Different.Namespace +{ +} diff --git a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/TrippinE2ETestCases.cs b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/TrippinE2ETestCases.cs index 03365dca..3bfd7cd8 100644 --- a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/TrippinE2ETestCases.cs +++ b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/TrippinE2ETestCases.cs @@ -205,6 +205,122 @@ public void CURDDerivedEntity() Assert.Equal(0, persons.Count); } + [Fact] + public void CURDComputedImmutableProperty() + { + this.TestClientContext.MergeOption = MergeOption.OverwriteChanges; + + // Post an entity + Order employee = new Order() + { + PersonId = 1, + OrderId = 11, + Price = 300, + ComputedProperty = "ShouldBeIgnored", + ImmutableProperty = "ShouldNotBeIgnored", + NormalOrderDetail = new OrderDetail() + { + NormalProperty = "ShouldNotBeIgnored", + ComputedProperty = "ShouldBeIgnored", + ImmutableProperty = "ShouldNotBeIgnored" + }, + ComputedOrderDetail = new OrderDetail() + { + NormalProperty = "IgnoredAsParentIgnored", + ComputedProperty = "IgnoredAsParentIgnored", + ImmutableProperty = "IgnoredAsParentIgnored" + }, + ImmutableOrderDetail = new OrderDetail() + { + NormalProperty = "ShouldNotBeIgnored", + ComputedProperty = "ShouldBeIgnored", + ImmutableProperty = "ShouldNotBeIgnored" + }, + }; + + this.TestClientContext.AddToOrders(employee); + this.TestClientContext.SaveChanges(); + long personId = employee.PersonId; + long orderId = employee.OrderId; + + // Query the new added entity + this.TestClientContext.Detach(employee); + employee = this.TestClientContext.Orders.Where(e => e.PersonId == personId && e.OrderId == orderId).First(); + // computed property should not have new value but Immutable property should have new value + Assert.Equal(300, employee.Price); + Assert.NotEqual("ShouldBeIgnored", employee.ComputedProperty); + Assert.Equal("ShouldNotBeIgnored", employee.ImmutableProperty); + + Assert.Equal("ShouldNotBeIgnored", employee.NormalOrderDetail.NormalProperty); + Assert.NotEqual("ShouldBeIgnored", employee.NormalOrderDetail.ComputedProperty); + Assert.Equal("ShouldNotBeIgnored", employee.NormalOrderDetail.ImmutableProperty); + + Assert.NotEqual("IgnoredAsParentIgnored", employee.ComputedOrderDetail.NormalProperty); + Assert.NotEqual("IgnoredAsParentIgnored", employee.ComputedOrderDetail.ComputedProperty); + Assert.NotEqual("IgnoredAsParentIgnored", employee.ComputedOrderDetail.ImmutableProperty); + + Assert.Equal("ShouldNotBeIgnored", employee.ImmutableOrderDetail.NormalProperty); + Assert.NotEqual("ShouldBeIgnored", employee.ImmutableOrderDetail.ComputedProperty); + Assert.Equal("ShouldNotBeIgnored", employee.ImmutableOrderDetail.ImmutableProperty); + + // Update an entity + employee.Price = 400; + employee.ComputedProperty = "ShouldBeIgnored2"; + employee.ImmutableProperty = "ShouldBeIgnored2"; + + employee.NormalOrderDetail = new OrderDetail() + { + NormalProperty = "ShouldNotBeIgnored2", + ComputedProperty = "ShouldBeIgnored2", + ImmutableProperty = "ShouldBeIgnored2" + }; + + employee.ComputedOrderDetail = new OrderDetail() + { + NormalProperty = "IgnoredAsParentIgnored2", + ComputedProperty = "IgnoredAsParentIgnored2", + ImmutableProperty = "IgnoredAsParentIgnored2" + }; + + employee.ImmutableOrderDetail = new OrderDetail() + { + NormalProperty = "ShouldBeIgnored2", + ComputedProperty = "ShouldBeIgnored2", + ImmutableProperty = "ShouldBeIgnored2" + }; + + this.TestClientContext.UpdateObject(employee); + this.TestClientContext.SaveChanges(); + + // Query the updated entity + this.TestClientContext.Detach(employee); + employee = this.TestClientContext.Orders.Where(e => e.PersonId == personId && e.OrderId == orderId).First(); + + // both computed property and immutable property should not have new value + Assert.Equal(400, employee.Price); + Assert.NotEqual("ShouldBeIgnored2", employee.ComputedProperty); + + // Immutable property has value set during insert. + Assert.NotEqual("ShouldBeIgnored2", employee.ImmutableProperty); + Assert.Equal("ShouldNotBeIgnored", employee.ImmutableProperty); + + Assert.Equal("ShouldNotBeIgnored2", employee.NormalOrderDetail.NormalProperty); + Assert.NotEqual("ShouldBeIgnored2", employee.NormalOrderDetail.ComputedProperty); + Assert.NotEqual("ShouldBeIgnored2", employee.NormalOrderDetail.ImmutableProperty); + + Assert.NotEqual("IgnoredAsParentIgnored2", employee.ComputedOrderDetail.NormalProperty); + Assert.NotEqual("IgnoredAsParentIgnored2", employee.ComputedOrderDetail.ComputedProperty); + Assert.NotEqual("IgnoredAsParentIgnored2", employee.ComputedOrderDetail.ImmutableProperty); + + Assert.NotEqual("ShouldBeIgnored2", employee.ImmutableOrderDetail.NormalProperty); + Assert.NotEqual("ShouldBeIgnored2", employee.ImmutableOrderDetail.ComputedProperty); + Assert.NotEqual("ShouldBeIgnored2", employee.ImmutableOrderDetail.ImmutableProperty); + + // Delete an entity + this.TestClientContext.DeleteObject(employee); + this.TestClientContext.SaveChanges(); + } + [Fact] public void CURDEntityWithComplexType() { @@ -359,7 +475,9 @@ public void CRUDCompositeKey() PersonId = 3, OrderId = 1, Description = "Person 3 order 1", - Price = 1000 + Price = 1000, + NormalOrderDetail = new OrderDetail(), + ImmutableOrderDetail = new OrderDetail() }; this.TestClientContext.AddToOrders(order); diff --git a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Api/TrippinApi.cs b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Api/TrippinApi.cs index 79a93d10..ef10a4b4 100644 --- a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Api/TrippinApi.cs +++ b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Api/TrippinApi.cs @@ -602,16 +602,38 @@ public async Task GetModelAsync(ModelContext context, CancellationTok { var model = await InnerHandler.GetModelAsync(context, cancellationToken); + var trueConstant = new EdmBooleanConstant(true); + // Set computed annotation var tripType = (EdmEntityType)model.SchemaElements.Single(e => e.Name == "Trip"); var trackGuidProperty = tripType.DeclaredProperties.Single(prop => prop.Name == "TrackGuid"); var timeStampValueProp = model.EntityContainer.FindEntitySet("Airlines").EntityType().FindProperty("TimeStampValue"); - var term = new EdmTerm("Org.OData.Core.V1", "Computed", EdmPrimitiveTypeKind.Boolean); - var anno1 = new EdmAnnotation(trackGuidProperty, term, new EdmBooleanConstant(true)); - var anno2 = new EdmAnnotation(timeStampValueProp, term, new EdmBooleanConstant(true)); + var computedTerm = new EdmTerm("Org.OData.Core.V1", "Computed", EdmPrimitiveTypeKind.Boolean); + var anno1 = new EdmAnnotation(trackGuidProperty, computedTerm, trueConstant); + var anno2 = new EdmAnnotation(timeStampValueProp, computedTerm, trueConstant); ((EdmModel)model).SetVocabularyAnnotation(anno1); ((EdmModel)model).SetVocabularyAnnotation(anno2); + + var immutableTerm = new EdmTerm("Org.OData.Core.V1", "Immutable", EdmPrimitiveTypeKind.Boolean); + + var orderType = (EdmEntityType)model.SchemaElements.Single(e => e.Name == "Order"); + var orderProp1 = orderType.DeclaredProperties.Single(prop => prop.Name == "ComputedProperty"); + var orderProp2 = orderType.DeclaredProperties.Single(prop => prop.Name == "ImmutableProperty"); + var orderProp3 = orderType.DeclaredProperties.Single(prop => prop.Name == "ComputedOrderDetail"); + var orderProp4 = orderType.DeclaredProperties.Single(prop => prop.Name == "ImmutableOrderDetail"); + + ((EdmModel)model).SetVocabularyAnnotation(new EdmAnnotation(orderProp1, computedTerm, trueConstant)); + ((EdmModel)model).SetVocabularyAnnotation(new EdmAnnotation(orderProp2, immutableTerm, trueConstant)); + ((EdmModel)model).SetVocabularyAnnotation(new EdmAnnotation(orderProp3, computedTerm, trueConstant)); + ((EdmModel)model).SetVocabularyAnnotation(new EdmAnnotation(orderProp4, immutableTerm, trueConstant)); + + var orderDetailType = (EdmComplexType)model.SchemaElements.Single(e => e.Name == "OrderDetail"); + var detailProp1 = orderDetailType.DeclaredProperties.Single(prop => prop.Name == "ComputedProperty"); + var detailProp2 = orderDetailType.DeclaredProperties.Single(prop => prop.Name == "ImmutableProperty"); + ((EdmModel)model).SetVocabularyAnnotation(new EdmAnnotation(detailProp1, computedTerm, trueConstant)); + ((EdmModel)model).SetVocabularyAnnotation(new EdmAnnotation(detailProp2, immutableTerm, trueConstant)); + var personType = (EdmEntityType)model.SchemaElements.Single(e => e.Name == "Person"); var type = personType.FindProperty("PersonId").Type; diff --git a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Microsoft.OData.Service.Sample.Trippin.csproj b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Microsoft.OData.Service.Sample.Trippin.csproj index cc154b2a..11a72e3f 100644 --- a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Microsoft.OData.Service.Sample.Trippin.csproj +++ b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Microsoft.OData.Service.Sample.Trippin.csproj @@ -66,6 +66,7 @@ + diff --git a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Models/Order.cs b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Models/Order.cs index 5f4ae0d3..bfce8323 100644 --- a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Models/Order.cs +++ b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Models/Order.cs @@ -8,6 +8,17 @@ namespace Microsoft.OData.Service.Sample.Trippin.Models { public class Order { + public Order() + { + // Set the computed value in constructor, it could be done by database layer + ComputedProperty = "OrderComputedValue"; + ComputedOrderDetail = new OrderDetail() + { + NormalProperty = "OrderDetailNormalProperty", + ImmutableProperty = "OrderDetailImmutableProperty" + }; + } + [Key] [Column(Order = 0)] public int PersonId { get; set; } @@ -18,6 +29,16 @@ public class Order public double Price { get; set; } + public string ComputedProperty { get; set; } + + public string ImmutableProperty { get; set; } + + public OrderDetail NormalOrderDetail { get; set; } + + public OrderDetail ComputedOrderDetail { get; set; } + + public OrderDetail ImmutableOrderDetail { get; set; } + public string Description { get; set; } } } \ No newline at end of file diff --git a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Models/OrderDetail.cs b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Models/OrderDetail.cs new file mode 100644 index 00000000..cbd6b680 --- /dev/null +++ b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Models/OrderDetail.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +namespace Microsoft.OData.Service.Sample.Trippin.Models +{ + /// + /// It will be a complex type to test complex property Computed and Immutable properties + /// + public class OrderDetail + { + public OrderDetail() + { + // Set the computed value in constructor, it could be done by database layer + ComputedProperty = "OrderDetailComputedValue"; + } + + public string NormalProperty { get; set; } + + public string ComputedProperty { get; set; } + + public string ImmutableProperty { get; set; } + } +} \ No newline at end of file diff --git a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Models/TrippinModel.cs b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Models/TrippinModel.cs index a2861d4d..3128f7c7 100644 --- a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Models/TrippinModel.cs +++ b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Models/TrippinModel.cs @@ -562,28 +562,40 @@ public static void ResetDataSource() PersonId = 1, OrderId = 1, Description = "Person 1 Order 1", - Price = 200 + Price = 200, + NormalOrderDetail = new OrderDetail(), + ComputedOrderDetail = new OrderDetail(), + ImmutableOrderDetail = new OrderDetail() }, new Order { PersonId = 1, OrderId = 2, Description = "Person 1 Order 2", - Price = 400 + Price = 400, + NormalOrderDetail = new OrderDetail(), + ComputedOrderDetail = new OrderDetail(), + ImmutableOrderDetail = new OrderDetail() }, new Order { PersonId = 2, OrderId = 1, Description = "Person 2 Order 1", - Price = 600 + Price = 600, + NormalOrderDetail = new OrderDetail(), + ComputedOrderDetail = new OrderDetail(), + ImmutableOrderDetail = new OrderDetail() }, new Order { PersonId = 2, OrderId = 2, Description = "Person 2 Order 2", - Price = 800 + Price = 800, + NormalOrderDetail = new OrderDetail(), + ComputedOrderDetail = new OrderDetail(), + ImmutableOrderDetail = new OrderDetail() }, }; instance.Orders.AddRange(orders);