diff --git a/src/OpenRiaServices.Client/Framework/ChangeSetBuilder.cs b/src/OpenRiaServices.Client/Framework/ChangeSetBuilder.cs index 123c0cc4b..770ea72ed 100644 --- a/src/OpenRiaServices.Client/Framework/ChangeSetBuilder.cs +++ b/src/OpenRiaServices.Client/Framework/ChangeSetBuilder.cs @@ -368,7 +368,7 @@ protected override void VisitEntityCollection(IEntityCollection entityCollection /// /// The association to check. /// The resulting collection of entries. - private IEnumerable FindOriginalChildren(AssociationAttribute association) + private IEnumerable FindOriginalChildren(EntityAssociationAttribute association) { foreach (ChangeSetEntry entry in this._changeSetEntries.Where(p => p.Entity.EntityState == EntityState.Deleted)) { @@ -467,7 +467,7 @@ protected override void VisitEntityCollection(IEntityCollection entityCollection // look for any invalid updates made to composed children if (entityCollection.HasValues && member.IsComposition) { - AssociationAttribute assoc = member.AssociationAttribute; + EntityAssociationAttribute assoc = member.AssociationAttribute; foreach (Entity childEntity in entityCollection.Entities) { CheckInvalidChildUpdates(childEntity, assoc); @@ -498,7 +498,7 @@ protected override void VisitEntityRef(IEntityRef entityRef, Entity parent, Meta /// /// The child entity to check. /// The composition attribute. - private static void CheckInvalidChildUpdates(Entity entity, AssociationAttribute compositionAttribute) + private static void CheckInvalidChildUpdates(Entity entity, EntityAssociationAttribute compositionAttribute) { if (compositionAttribute == null) { diff --git a/src/OpenRiaServices.Client/Framework/Entity.cs b/src/OpenRiaServices.Client/Framework/Entity.cs index ac9a8933c..ea7f4195e 100644 --- a/src/OpenRiaServices.Client/Framework/Entity.cs +++ b/src/OpenRiaServices.Client/Framework/Entity.cs @@ -38,7 +38,7 @@ public abstract partial class Entity : IEditableObject, INotifyPropertyChanged, private bool _trackChanges; private Entity _parent; - private AssociationAttribute _parentAssociation; + private EntityAssociationAttribute _parentAssociation; private bool _hasChildChanges; private Dictionary _trackedInstances; private MetaType _metaType; @@ -86,7 +86,7 @@ internal Entity Parent /// /// Gets the parent association for this entity. /// - internal AssociationAttribute ParentAssociation + internal EntityAssociationAttribute ParentAssociation { get { @@ -121,7 +121,7 @@ internal MetaType MetaType /// /// The parent. /// The parent association. - internal void SetParent(Entity parent, AssociationAttribute association) + internal void SetParent(Entity parent, EntityAssociationAttribute association) { if (this._parent != parent) { diff --git a/src/OpenRiaServices.Client/Framework/EntityAssociationAttribute.cs b/src/OpenRiaServices.Client/Framework/EntityAssociationAttribute.cs new file mode 100644 index 000000000..99d42e944 --- /dev/null +++ b/src/OpenRiaServices.Client/Framework/EntityAssociationAttribute.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; + +#pragma warning disable CS3015 // Type has no accessible constructors which use only CLS-compliant types + +namespace OpenRiaServices +{ + /// + /// Used to mark an Entity member as an association + /// + [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)] + + public sealed class EntityAssociationAttribute : Attribute +#pragma warning restore CS3015 // Type has no accessible constructors which use only CLS-compliant types + { + /// + /// Full form of constructor + /// + /// The name of the association. For bi-directional associations, + /// the name must be the same on both sides of the association + /// List of the property names of the key values on this side of the association + /// List of the property names of the key values on the other side of the association + public EntityAssociationAttribute(string name, string[] thisKey, string[] otherKey) + { + Name = name ?? throw new ArgumentNullException(nameof(name)); + ThisKeyMembers = thisKey ?? throw new ArgumentNullException(nameof(thisKey)); + OtherKeyMembers = otherKey ?? throw new ArgumentNullException(nameof(otherKey)); + + if (name .Length == 0) + throw new ArgumentException("Name cannot be empty", nameof(name)); + if (thisKey.Length == 0) + throw new ArgumentException("ThisKey cannot be empty", nameof(thisKey)); + if (otherKey.Length == 0) + throw new ArgumentException("OtherKey cannot be empty", nameof(otherKey)); + } + + /// + /// Gets the name of the association. For bi-directional associations, the name must + /// be the same on both sides of the association + /// + public string Name { get; } + + /// + /// Gets or sets a value indicating whether this association member represents + /// the foreign key side of an association + /// + public bool IsForeignKey { get; set; } + + /// + /// Gets the collection of individual key members specified in the ThisKey string. + /// + public IReadOnlyCollection ThisKeyMembers { get; } + + /// + /// Gets the collection of individual key members specified in the OtherKey string. + /// + public IReadOnlyCollection OtherKeyMembers { get; } + + /// + /// Gets or sets the key value on this side of the association + /// + public string ThisKey => string.Join(",", ThisKeyMembers); + + /// + /// representation of the key value on the other side of the association + /// + public string OtherKey => string.Join(",", OtherKeyMembers); + } +} diff --git a/src/OpenRiaServices.Client/Framework/EntityCollection.cs b/src/OpenRiaServices.Client/Framework/EntityCollection.cs index 76fb74a90..d73850244 100644 --- a/src/OpenRiaServices.Client/Framework/EntityCollection.cs +++ b/src/OpenRiaServices.Client/Framework/EntityCollection.cs @@ -41,7 +41,7 @@ public sealed class EntityCollection : IEntityCollection, IEntityCollec private bool _entitiesLoaded; private bool _entitiesAdded; - private AssociationAttribute AssocAttribute => _metaMember.AssociationAttribute; + private EntityAssociationAttribute AssocAttribute => _metaMember.AssociationAttribute; private bool IsComposition => _metaMember.IsComposition; /// @@ -74,7 +74,7 @@ public EntityCollection(Entity parent, string memberName, Func en { throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resource.Property_Does_Not_Exist, parent.GetType(), memberName), nameof(memberName)); } - if (this._metaMember.AssociationAttribute == null) + if (!this._metaMember.IsAssociationMember) { throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resource.MemberMustBeAssociation, memberName), nameof(memberName)); } @@ -770,7 +770,7 @@ private void ResetLoadedEntities() #endregion #region IEntityCollection Members - AssociationAttribute IEntityCollection.Association + EntityAssociationAttribute IEntityCollection.Association { get { diff --git a/src/OpenRiaServices.Client/Framework/EntityRef.cs b/src/OpenRiaServices.Client/Framework/EntityRef.cs index 9d89d3481..89076a4a5 100644 --- a/src/OpenRiaServices.Client/Framework/EntityRef.cs +++ b/src/OpenRiaServices.Client/Framework/EntityRef.cs @@ -27,7 +27,7 @@ public sealed class EntityRef : IEntityRef where TEntity : Entity private string MemberName => _metaMember.Name; private bool IsComposition => _metaMember.IsComposition; - private AssociationAttribute AssocAttribute => _metaMember.AssociationAttribute; + private EntityAssociationAttribute AssocAttribute => _metaMember.AssociationAttribute; /// /// Initializes a new instance of the EntityRef class @@ -58,7 +58,7 @@ public EntityRef(Entity parent, string memberName, Func entityPre { throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resource.Property_Does_Not_Exist, parent.GetType(), memberName), nameof(memberName)); } - if (this._metaMember.AssociationAttribute == null) + if (!this._metaMember.IsAssociationMember) { throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resource.MemberMustBeAssociation, memberName), nameof(memberName)); } @@ -393,7 +393,7 @@ private void ParentEntityPropertyChanged(object sender, PropertyChangedEventArgs } #region IEntityRef Members - AssociationAttribute IEntityRef.Association + EntityAssociationAttribute IEntityRef.Association { get { @@ -441,7 +441,7 @@ internal interface IEntityRef /// /// Gets the AssociationAttribute for this reference. /// - AssociationAttribute Association + EntityAssociationAttribute Association { get; } diff --git a/src/OpenRiaServices.Client/Framework/EntitySet.cs b/src/OpenRiaServices.Client/Framework/EntitySet.cs index 1d2d35237..5e04b18e2 100644 --- a/src/OpenRiaServices.Client/Framework/EntitySet.cs +++ b/src/OpenRiaServices.Client/Framework/EntitySet.cs @@ -20,7 +20,7 @@ namespace OpenRiaServices.Client /// public abstract class EntitySet : IEnumerable, ICollection, INotifyCollectionChanged, IRevertibleChangeTracking, INotifyPropertyChanged { - private readonly Dictionary> _associationUpdateCallbackMap = new Dictionary>(); + private readonly Dictionary> _associationUpdateCallbackMap = new(); private readonly Type _entityType; private EntityContainer _entityContainer; private EntitySetOperations _supportedOperations; @@ -305,7 +305,7 @@ internal void UpdateRelatedAssociations(Entity entity, string propertyName) /// AssociationAttribute indicating the association to monitor /// The callback to call /// True if the callback is being registered, false if it is being unregistered - internal void RegisterAssociationCallback(AssociationAttribute association, Action callback, bool register) + internal void RegisterAssociationCallback(EntityAssociationAttribute association, Action callback, bool register) { this._associationUpdateCallbackMap.TryGetValue(association, out Action del); if (register) @@ -1426,7 +1426,7 @@ public int Add(object value) int countBefore = this.Source.Count; this.Source.Add(entity); - return this.Source.Count == countBefore + 1 + return this.Source.Count == countBefore + 1 ? countBefore : ((List)this.Source.List).IndexOf(entity, countBefore); } diff --git a/src/OpenRiaServices.Client/Framework/IEntityCollection.cs b/src/OpenRiaServices.Client/Framework/IEntityCollection.cs index fc2b7bf77..f7e15681a 100644 --- a/src/OpenRiaServices.Client/Framework/IEntityCollection.cs +++ b/src/OpenRiaServices.Client/Framework/IEntityCollection.cs @@ -13,7 +13,7 @@ internal interface IEntityCollection /// /// Gets the AssociationAttribute for this collection. /// - AssociationAttribute Association + EntityAssociationAttribute Association { get; } diff --git a/src/OpenRiaServices.Client/Framework/Internal/MetaMember.cs b/src/OpenRiaServices.Client/Framework/Internal/MetaMember.cs index 596a03fee..ace860341 100644 --- a/src/OpenRiaServices.Client/Framework/Internal/MetaMember.cs +++ b/src/OpenRiaServices.Client/Framework/Internal/MetaMember.cs @@ -44,7 +44,21 @@ internal MetaMember(MetaType metaType, PropertyInfo property, bool isRoundtripEn IsKeyMember = TypeUtility.IsAttributeDefined(property, typeof(KeyAttribute), false); IsComposition = TypeUtility.IsAttributeDefined(property, typeof(CompositionAttribute), false); - AssociationAttribute = (AssociationAttribute)property.GetCustomAttributes(typeof(AssociationAttribute), false).SingleOrDefault(); + if (property.GetCustomAttribute(false) is { } association) + { + this.AssociationAttribute = association; + } +#pragma warning disable CS0618 // Type or member is obsolete + // TODO: Remove fallback when code generation has used the never attribute for a little while + else if (property.GetCustomAttribute(false) is { } associationAttribute) + { + this.AssociationAttribute = new EntityAssociationAttribute(associationAttribute.Name, associationAttribute.ThisKeyMembers.ToArray(), associationAttribute.OtherKeyMembers.ToArray()) + { + IsForeignKey = associationAttribute.IsForeignKey, + }; + } +#pragma warning restore CS0618 // Type or member is obsolete + EditableAttribute = (EditableAttribute)property.GetCustomAttributes(typeof(EditableAttribute), false).SingleOrDefault(); IsRoundtripMember = CheckIfRoundtripMember(this, isRoundtripEntity); @@ -88,7 +102,7 @@ internal MetaMember(MetaType metaType, PropertyInfo property, bool isRoundtripEn /// Gets any applied to the property, or null /// if no attribute is specified for the property /// - public AssociationAttribute AssociationAttribute { get; } + public EntityAssociationAttribute AssociationAttribute { get; } /// /// Gets a value indicating whether this member is one of the supported values to send between diff --git a/src/OpenRiaServices.Client/Framework/OpenRiaServices.Client.csproj b/src/OpenRiaServices.Client/Framework/OpenRiaServices.Client.csproj index a0a7292a9..a3034582f 100644 --- a/src/OpenRiaServices.Client/Framework/OpenRiaServices.Client.csproj +++ b/src/OpenRiaServices.Client/Framework/OpenRiaServices.Client.csproj @@ -3,8 +3,6 @@ net472;netstandard2.0;net6.0-windows - - $(NoWarn);CS0618 $(DefineConstants);HAS_COLLECTIONVIEW true diff --git a/src/OpenRiaServices.Client/Test/Client.Test/Data/DataAnnotationsTests.cs b/src/OpenRiaServices.Client/Test/Client.Test/Data/DataAnnotationsTests.cs index 72fb9386f..367406b7b 100644 --- a/src/OpenRiaServices.Client/Test/Client.Test/Data/DataAnnotationsTests.cs +++ b/src/OpenRiaServices.Client/Test/Client.Test/Data/DataAnnotationsTests.cs @@ -13,18 +13,12 @@ public void TestDefaultDataAnnotationAttributeCtors() { Type[] _knownAttributeTypes = { typeof(KeyAttribute), - typeof(AssociationAttribute), typeof(ConcurrencyCheckAttribute), typeof(TimestampAttribute) }; foreach (Type t in _knownAttributeTypes) { - if (t == typeof(AssociationAttribute)) { - // no default constructor defined - continue; - } - Attribute attr = null; string message = string.Empty; try @@ -38,22 +32,5 @@ public void TestDefaultDataAnnotationAttributeCtors() Assert.IsNotNull(attr, "Default ctor failed for attribute type " + t.GetType().Name + message); } } - - [TestMethod] - public void TestAssociationAttribute() - { - AssociationAttribute attr = new AssociationAttribute("name", "thisKey", "otherKey"); - attr.IsForeignKey = false; - - Assert.AreEqual("name", attr.Name); - Assert.AreEqual("thisKey", attr.ThisKey); - Assert.AreEqual("otherKey", attr.OtherKey); - Assert.AreEqual(false, attr.IsForeignKey); - - // Verify can reverse polarity of foreign key - attr.IsForeignKey = true; - Assert.AreEqual(true, attr.IsForeignKey); - - } } } diff --git a/src/OpenRiaServices.Server/Framework/OpenRiaServices.Server.csproj b/src/OpenRiaServices.Server/Framework/OpenRiaServices.Server.csproj index cba3840bd..f628ea915 100644 --- a/src/OpenRiaServices.Server/Framework/OpenRiaServices.Server.csproj +++ b/src/OpenRiaServices.Server/Framework/OpenRiaServices.Server.csproj @@ -3,10 +3,6 @@ net472;netstandard2.0;net6.0 $(DefineConstants);SERVERFX - - - $(NoWarn);CS0618 - @@ -30,6 +26,7 @@ + diff --git a/src/OpenRiaServices.Tools.TextTemplate/Framework/CSharpGenerators/AttributeGenerationHelpers/AttributeGeneratorHelper.cs b/src/OpenRiaServices.Tools.TextTemplate/Framework/CSharpGenerators/AttributeGenerationHelpers/AttributeGeneratorHelper.cs index 2ce57fc7c..802ccacdf 100644 --- a/src/OpenRiaServices.Tools.TextTemplate/Framework/CSharpGenerators/AttributeGenerationHelpers/AttributeGeneratorHelper.cs +++ b/src/OpenRiaServices.Tools.TextTemplate/Framework/CSharpGenerators/AttributeGenerationHelpers/AttributeGeneratorHelper.cs @@ -1,9 +1,11 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; +using System.Diagnostics; using System.Globalization; using System.Linq; using System.Runtime.Serialization; +using System.Text; using OpenRiaServices.Server; namespace OpenRiaServices.Tools.TextTemplate @@ -57,6 +59,9 @@ internal class AttributeGeneratorHelper { typeof(EntityActionAttribute), null }, { typeof(RequiresAuthenticationAttribute), null }, { typeof(RequiresRoleAttribute), null }, + // Translate all AssociationAttribute to EntityAssociationAttribute on the client + { typeof(AssociationAttribute), new EntityAssociationAttributeBuilder() }, + //{ typeof(EntityAssociationAttribute), new EntityAssociationAttributeBuilder() }, }; public static AttributeDeclaration GetAttributeDeclaration(Attribute attribute, ClientCodeGenerator textTemplateClientCodeGenerator, bool forcePropagation) @@ -298,6 +303,25 @@ internal static string ConvertValueToCode(object value, bool isCSharp) return CodeGenUtilities.GetTypeName(value.GetType()) + "." + value.ToString(); } + if (value is Array array) + { + Debug.Assert(isCSharp); + + StringBuilder stringBuilder = new StringBuilder(200); + + stringBuilder.Append($"new "); + stringBuilder.Append(CodeGenUtilities.GetTypeName(value.GetType().GetElementType())); + stringBuilder.Append("[] {"); + for (int i=0; i < array.Length; i++) + { + if (i > 0) + stringBuilder.Append(", "); + stringBuilder.Append(ConvertValueToCode(array.GetValue(i), isCSharp)); + } + stringBuilder.Append('}'); + return stringBuilder.ToString(); + } + return value.ToString(); } diff --git a/src/OpenRiaServices.Tools.TextTemplate/Framework/OpenRiaServices.Tools.TextTemplate.csproj b/src/OpenRiaServices.Tools.TextTemplate/Framework/OpenRiaServices.Tools.TextTemplate.csproj index f9e82f77b..52cd960ac 100644 --- a/src/OpenRiaServices.Tools.TextTemplate/Framework/OpenRiaServices.Tools.TextTemplate.csproj +++ b/src/OpenRiaServices.Tools.TextTemplate/Framework/OpenRiaServices.Tools.TextTemplate.csproj @@ -17,6 +17,7 @@ + diff --git a/src/OpenRiaServices.Tools/Framework/MetadataPipeline/CustomAttributeGenerator.cs b/src/OpenRiaServices.Tools/Framework/MetadataPipeline/CustomAttributeGenerator.cs index bcffc5976..a264d41ad 100644 --- a/src/OpenRiaServices.Tools/Framework/MetadataPipeline/CustomAttributeGenerator.cs +++ b/src/OpenRiaServices.Tools/Framework/MetadataPipeline/CustomAttributeGenerator.cs @@ -66,6 +66,10 @@ internal static class CustomAttributeGenerator { typeof(EntityActionAttribute), null }, { typeof(RequiresAuthenticationAttribute), null }, { typeof(RequiresRoleAttribute), null }, + + // Translate all AssociationAttribute to EntityAssociationAttribute on the client + { typeof(AssociationAttribute), new EntityAssociationAttributeBuilder() }, + //{ typeof(EntityAssociationAttribute), new EntityAssociationAttributeBuilder() }, }; /// @@ -662,6 +666,16 @@ private static CodeExpression CreateCodeExpression(CodeDomClientCodeGenerator pr } return e; } + // Handle arrays + if (value is Array array) + { + CodeArrayCreateExpression arrayCreateExpression = new CodeArrayCreateExpression(CodeGenUtilities.GetTypeReference(typeOfValue.GetElementType(), proxyGenerator, referencingType), array.Length); + foreach (object element in array) + { + arrayCreateExpression.Initializers.Add(CreateCodeExpression(proxyGenerator, referencingType, element)); + } + return arrayCreateExpression; + } // typeof(T) requires special handling Type valueAsType = value as Type; diff --git a/src/OpenRiaServices.Tools/Framework/MetadataPipeline/EntityAssociationAttributeBuilder.cs b/src/OpenRiaServices.Tools/Framework/MetadataPipeline/EntityAssociationAttributeBuilder.cs new file mode 100644 index 000000000..a9ccc4b5c --- /dev/null +++ b/src/OpenRiaServices.Tools/Framework/MetadataPipeline/EntityAssociationAttributeBuilder.cs @@ -0,0 +1,52 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.Linq; + +namespace OpenRiaServices.Tools +{ + /// + /// Custom attribute builder generates representations of + /// instances. + /// + internal class EntityAssociationAttributeBuilder : ICustomAttributeBuilder + { + /// + /// Generates a representation of an + /// instance. + /// + public AttributeDeclaration GetAttributeDeclaration(Attribute attribute) + { + AttributeDeclaration attributeDeclaration = new AttributeDeclaration(typeof(EntityAssociationAttribute)); + + if (attribute is EntityAssociationAttribute entityAssociation) + { + attributeDeclaration.ConstructorArguments.Add(entityAssociation.Name); + attributeDeclaration.ConstructorArguments.Add((string[])entityAssociation.ThisKeyMembers); + attributeDeclaration.ConstructorArguments.Add((string[])entityAssociation.OtherKeyMembers); + + if (entityAssociation.IsForeignKey) + { + attributeDeclaration.NamedParameters.Add(nameof(EntityAssociationAttribute.IsForeignKey), true); + } + } + else if (attribute is AssociationAttribute associationAttribute) + { + // [EntityAssociation( {true|false} )] + attributeDeclaration.ConstructorArguments.Add(associationAttribute.Name); + attributeDeclaration.ConstructorArguments.Add(associationAttribute.ThisKeyMembers.ToArray()); + attributeDeclaration.ConstructorArguments.Add(associationAttribute.OtherKeyMembers.ToArray()); + + if (associationAttribute.IsForeignKey) + { + attributeDeclaration.NamedParameters.Add(nameof(EntityAssociationAttribute.IsForeignKey), true); + } + } + else + { + return null; + } + + return attributeDeclaration; + } + } +} diff --git a/src/OpenRiaServices.Tools/Test/AssemblyGenerator.cs b/src/OpenRiaServices.Tools/Test/AssemblyGenerator.cs index 3da9aa0cf..50c99158a 100644 --- a/src/OpenRiaServices.Tools/Test/AssemblyGenerator.cs +++ b/src/OpenRiaServices.Tools/Test/AssemblyGenerator.cs @@ -7,6 +7,8 @@ using System.Text; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.CodeAnalysis.Text; +using System.Collections.ObjectModel; +using System.Collections; namespace OpenRiaServices.Tools.Test { @@ -316,6 +318,13 @@ internal static bool TryGetCustomAttributeValue(CustomAttributeData attribute value = (T)ctorArg.Value; return true; } + // Special case to handle backwards compat for tests written againt AssociationAttribute + // that takes string arguments in constructor insterad of Arrrays as EntityAssociationAttribute does + else if (typeof(T) == typeof(string) && ctorArg.ArgumentType.IsArray) + { + value = (T)(object)string.Join(", ", ((IEnumerable)ctorArg.Value).Select(arg => arg.Value?.ToString() ?? "null")); + return true; + } } } diff --git a/src/OpenRiaServices.Tools/Test/CodeGenExternalAttributeTests.cs b/src/OpenRiaServices.Tools/Test/CodeGenExternalAttributeTests.cs index d272941d5..c2ec0a2d9 100644 --- a/src/OpenRiaServices.Tools/Test/CodeGenExternalAttributeTests.cs +++ b/src/OpenRiaServices.Tools/Test/CodeGenExternalAttributeTests.cs @@ -54,7 +54,7 @@ public void CodeGen_External_Entity_EFtoPOCO() TestHelper.AssertGeneratedCodeContains( generatedCode, "private EntityRef _personalDetails_MarkedAsExternal;", - "[Association(\"Employee_PersonalDetails\", \"EmployeeID\", \"UniqueID\", IsForeignKey=true)] [ExternalReference()]", + "[EntityAssociation(\"Employee_PersonalDetails\", new string[] { \"EmployeeID\"}, new string[] { \"UniqueID\"}, IsForeignKey=true)] [ExternalReference()]", "public global::DataTests.Scenarios.EF.Northwind.PersonalDetails PersonalDetails_MarkedAsExternal", "private bool FilterPersonalDetails_MarkedAsExternal(global::DataTests.Scenarios.EF.Northwind.PersonalDetails entity)"); } diff --git a/src/OpenRiaServices.Tools/Test/InheritanceCodeGenTests.cs b/src/OpenRiaServices.Tools/Test/InheritanceCodeGenTests.cs index b81518391..23608a610 100644 --- a/src/OpenRiaServices.Tools/Test/InheritanceCodeGenTests.cs +++ b/src/OpenRiaServices.Tools/Test/InheritanceCodeGenTests.cs @@ -290,7 +290,7 @@ public void Inherit_Gen_Assoc_Uni_Derived_To_Included_Root() Assert.IsNotNull(pInfo, "Expected 'Target' property on derived type"); Assert.AreEqual(otherType, pInfo.PropertyType, "'Target' property should have been of type " + otherType); - CustomAttributeData assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(AssociationAttribute)).SingleOrDefault(); + CustomAttributeData assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(EntityAssociationAttribute)).SingleOrDefault(); Assert.IsNotNull(assocCad, "Could not find Association custom attribute data on 'Target' property"); string value = AssemblyGenerator.GetCustomAttributeValue(assocCad, "thisKey"); @@ -347,7 +347,7 @@ public void Inherit_Gen_Assoc_Bi_Derived_To_Included_Root() Assert.IsNotNull(pInfo, "Expected 'Target' property on derived type"); Assert.AreEqual(targetType, pInfo.PropertyType, "'Target' property should have been of type " + targetType); - CustomAttributeData assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(AssociationAttribute)).SingleOrDefault(); + CustomAttributeData assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(EntityAssociationAttribute)).SingleOrDefault(); Assert.IsNotNull(assocCad, "Could not find Association custom attribute data on 'Target' property"); string value = AssemblyGenerator.GetCustomAttributeValue(assocCad, "thisKey"); @@ -365,7 +365,7 @@ public void Inherit_Gen_Assoc_Bi_Derived_To_Included_Root() Assert.IsNotNull(pInfo, "Expected 'Source' property on target type"); Assert.AreEqual(derivedType, pInfo.PropertyType, "'Source' property should have been of type " + derivedType); - assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(AssociationAttribute)).SingleOrDefault(); + assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(EntityAssociationAttribute)).SingleOrDefault(); Assert.IsNotNull(assocCad, "Could not find Association custom attribute data on 'Source' property"); value = AssemblyGenerator.GetCustomAttributeValue(assocCad, "thisKey"); @@ -428,7 +428,7 @@ public void Inherit_Gen_Assoc_Bi_Derived_To_Included_Derived() Assert.IsNotNull(pInfo, "Expected 'Target' property on derived type"); Assert.AreEqual(targetType, pInfo.PropertyType, "'Target' property should have been of type " + targetType); - CustomAttributeData assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(AssociationAttribute)).SingleOrDefault(); + CustomAttributeData assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(EntityAssociationAttribute)).SingleOrDefault(); Assert.IsNotNull(assocCad, "Could not find Association custom attribute data on 'Target' property"); string value = AssemblyGenerator.GetCustomAttributeValue(assocCad, "thisKey"); @@ -446,7 +446,7 @@ public void Inherit_Gen_Assoc_Bi_Derived_To_Included_Derived() Assert.IsNotNull(pInfo, "Expected 'Source' property on target type"); Assert.AreEqual(derivedType, pInfo.PropertyType, "'Source' property should have been of type " + derivedType); - assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(AssociationAttribute)).SingleOrDefault(); + assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(EntityAssociationAttribute)).SingleOrDefault(); Assert.IsNotNull(assocCad, "Could not find Association custom attribute data on 'Source' property"); value = AssemblyGenerator.GetCustomAttributeValue(assocCad, "thisKey"); @@ -513,7 +513,7 @@ public void Inherit_Gen_Assoc_Bi_Derived_To_Included_Derived_OneToMany() Type genericType = propType.GetGenericArguments()[0]; Assert.AreEqual(targetType, genericType, "'Targets' property should have been of type " + targetType + ", not " + genericType); - CustomAttributeData assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(AssociationAttribute)).SingleOrDefault(); + CustomAttributeData assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(EntityAssociationAttribute)).SingleOrDefault(); Assert.IsNotNull(assocCad, "Could not find Association custom attribute data on 'Targets' property"); string value = AssemblyGenerator.GetCustomAttributeValue(assocCad, "thisKey"); @@ -532,7 +532,7 @@ public void Inherit_Gen_Assoc_Bi_Derived_To_Included_Derived_OneToMany() propType = pInfo.PropertyType; Assert.AreEqual(derivedType, propType, "'Sources' property should have been of type " + derivedType + ", not " + propType); - assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(AssociationAttribute)).SingleOrDefault(); + assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(EntityAssociationAttribute)).SingleOrDefault(); Assert.IsNotNull(assocCad, "Could not find Association custom attribute data on 'Source' property"); value = AssemblyGenerator.GetCustomAttributeValue(assocCad, "thisKey"); @@ -597,7 +597,7 @@ public void Inherit_Gen_Assoc_Bi_Derived_To_Included_Derived_ManyToOne() Type propType = pInfo.PropertyType; Assert.AreEqual(targetType, propType, "'Target' property should have been of type " + targetType + ", not " + propType); - CustomAttributeData assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(AssociationAttribute)).SingleOrDefault(); + CustomAttributeData assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(EntityAssociationAttribute)).SingleOrDefault(); Assert.IsNotNull(assocCad, "Could not find Association custom attribute data on 'Targets' property"); string value = AssemblyGenerator.GetCustomAttributeValue(assocCad, "thisKey"); @@ -619,7 +619,7 @@ public void Inherit_Gen_Assoc_Bi_Derived_To_Included_Derived_ManyToOne() Type genericType = propType.GetGenericArguments()[0]; Assert.AreEqual(derivedType, genericType, "'Sources' property should have been of type " + derivedType + ", not " + genericType); - assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(AssociationAttribute)).SingleOrDefault(); + assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(EntityAssociationAttribute)).SingleOrDefault(); Assert.IsNotNull(assocCad, "Could not find Association custom attribute data on 'Source' property"); value = AssemblyGenerator.GetCustomAttributeValue(assocCad, "thisKey"); @@ -691,7 +691,7 @@ public void Inherit_Gen_Projection_Bi_Derived_To_Included_Derived() Assert.IsNotNull(pInfo, "Expected 'Target' property on derived type"); Assert.AreEqual(targetType, pInfo.PropertyType, "'Target' property should have been of type " + targetType); - CustomAttributeData assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(AssociationAttribute)).SingleOrDefault(); + CustomAttributeData assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(EntityAssociationAttribute)).SingleOrDefault(); Assert.IsNotNull(assocCad, "Could not find Association custom attribute data on 'Target' property"); string value = AssemblyGenerator.GetCustomAttributeValue(assocCad, "thisKey"); @@ -709,7 +709,7 @@ public void Inherit_Gen_Projection_Bi_Derived_To_Included_Derived() Assert.IsNotNull(pInfo, "Expected 'Source' property on target type"); Assert.AreEqual(derivedType, pInfo.PropertyType, "'Source' property should have been of type " + derivedType); - assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(AssociationAttribute)).SingleOrDefault(); + assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(EntityAssociationAttribute)).SingleOrDefault(); Assert.IsNotNull(assocCad, "Could not find Association custom attribute data on 'Source' property"); value = AssemblyGenerator.GetCustomAttributeValue(assocCad, "thisKey"); @@ -790,7 +790,7 @@ public void Inherit_Gen_Projection_Bi_Derived_To_Included_Derived_Reversed() Assert.IsNotNull(pInfo, "Expected 'Target' property on derived type"); Assert.AreEqual(targetType, pInfo.PropertyType, "'Target' property should have been of type " + targetType); - CustomAttributeData assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(AssociationAttribute)).SingleOrDefault(); + CustomAttributeData assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(EntityAssociationAttribute)).SingleOrDefault(); Assert.IsNotNull(assocCad, "Could not find Association custom attribute data on 'Target' property"); string value = AssemblyGenerator.GetCustomAttributeValue(assocCad, "thisKey"); @@ -808,7 +808,7 @@ public void Inherit_Gen_Projection_Bi_Derived_To_Included_Derived_Reversed() Assert.IsNotNull(pInfo, "Expected 'Source' property on target type"); Assert.AreEqual(derivedType, pInfo.PropertyType, "'Source' property should have been of type " + derivedType); - assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(AssociationAttribute)).SingleOrDefault(); + assocCad = AssemblyGenerator.GetCustomAttributeData(pInfo, typeof(EntityAssociationAttribute)).SingleOrDefault(); Assert.IsNotNull(assocCad, "Could not find Association custom attribute data on 'Source' property"); value = AssemblyGenerator.GetCustomAttributeValue(assocCad, "thisKey"); diff --git a/src/OpenRiaServices.Tools/Test/MockSharedCodeService.cs b/src/OpenRiaServices.Tools/Test/MockSharedCodeService.cs index 603a3c4fb..e826d1549 100644 --- a/src/OpenRiaServices.Tools/Test/MockSharedCodeService.cs +++ b/src/OpenRiaServices.Tools/Test/MockSharedCodeService.cs @@ -27,9 +27,10 @@ class MockSharedCodeService : ISharedCodeService, IDisposable typeof(DataMemberAttribute), typeof(System.ComponentModel.DescriptionAttribute), typeof(DomainIdentifierAttribute), - typeof(ExternalReferenceAttribute), + typeof(ExternalReferenceAttribute), typeof(ReadOnlyAttribute), - typeof(CompositionAttribute) + typeof(CompositionAttribute), + typeof(EntityAssociationAttribute) }; private readonly HashSet _sharedTypes; diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Cities/Cities.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Cities/Cities.g.cs index 35be6e93b..7d9a0dae0 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Cities/Cities.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Cities/Cities.g.cs @@ -112,7 +112,11 @@ public string CalculatedCounty /// /// Gets or sets the associated entity. /// - [Association("County_City", "CountyName,StateName", "Name,StateName", IsForeignKey=true)] + [EntityAssociation("County_City", new string[] { + "CountyName", + "StateName"}, new string[] { + "Name", + "StateName"}, IsForeignKey=true)] public County County { get @@ -241,7 +245,13 @@ public string StateName /// /// Gets the collection of associated entity instances. /// - [Association("City_Zip", "Name, CountyName, StateName", "CityName, CountyName, StateName")] + [EntityAssociation("City_Zip", new string[] { + "Name", + "CountyName", + "StateName"}, new string[] { + "CityName", + "CountyName", + "StateName"})] public EntityCollection ZipCodes { get @@ -1587,7 +1597,13 @@ public string Info /// /// Gets the collection of associated entity instances. /// - [Association("CityWithInfo_ZipWithInfo", "Name, CountyName, StateName", "CityName, CountyName, StateName")] + [EntityAssociation("CityWithInfo_ZipWithInfo", new string[] { + "Name", + "CountyName", + "StateName"}, new string[] { + "CityName", + "CountyName", + "StateName"})] public EntityCollection ZipCodesWithInfo { get @@ -1685,7 +1701,11 @@ public County() /// /// Gets the collection of associated entity instances. /// - [Association("County_City", "Name,StateName", "CountyName,StateName")] + [EntityAssociation("County_City", new string[] { + "Name", + "StateName"}, new string[] { + "CountyName", + "StateName"})] public EntityCollection Cities { get @@ -1730,7 +1750,9 @@ public string Name /// /// Gets or sets the associated entity. /// - [Association("State_County", "StateName", "Name", IsForeignKey=true)] + [EntityAssociation("State_County", new string[] { + "StateName"}, new string[] { + "Name"}, IsForeignKey=true)] public State State { get @@ -1906,9 +1928,11 @@ public State() /// /// Gets the collection of associated entity instances. /// - [Association("State_County", "Name", "StateName")] [CustomValidation(typeof(CountiesValidator), "AreCountiesValid")] [Editable(false)] + [EntityAssociation("State_County", new string[] { + "Name"}, new string[] { + "StateName"})] [ReadOnly(true)] public EntityCollection Counties { @@ -2117,8 +2141,14 @@ public Zip() /// /// Gets or sets the associated entity. /// - [Association("City_Zip", "CityName, CountyName, StateName", "Name, CountyName, StateName", IsForeignKey=true)] [CustomValidation(typeof(CityPropertyValidator), "IsValidCity")] + [EntityAssociation("City_Zip", new string[] { + "CityName", + "CountyName", + "StateName"}, new string[] { + "Name", + "CountyName", + "StateName"}, IsForeignKey=true)] public City City { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Cities/Cities.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Cities/Cities.g.vb index 7a96b090c..d71ecfe6c 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Cities/Cities.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Cities/Cities.g.vb @@ -131,7 +131,7 @@ Namespace Cities ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property County() As County Get If (Me._county Is Nothing) Then @@ -238,7 +238,7 @@ Namespace Cities ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property ZipCodes() As EntityCollection(Of Zip) Get If (Me._zipCodes Is Nothing) Then @@ -1497,7 +1497,7 @@ Namespace Cities ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property ZipCodesWithInfo() As EntityCollection(Of ZipWithInfo) Get If (Me._zipCodesWithInfo Is Nothing) Then @@ -1590,7 +1590,7 @@ Namespace Cities ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Cities() As EntityCollection(Of City) Get If (Me._cities Is Nothing) Then @@ -1628,7 +1628,7 @@ Namespace Cities ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property State() As State Get If (Me._state Is Nothing) Then @@ -1791,9 +1791,9 @@ Namespace Cities ''' ''' Gets the collection of associated entity instances. ''' - _ Public ReadOnly Property Counties() As EntityCollection(Of County) Get @@ -1995,8 +1995,8 @@ Namespace Cities ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property City() As City Get If (Me._city Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EF.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EF.g.cs index f17756b53..ca1ba208d 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EF.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EF.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -296,7 +295,9 @@ public string LoginID /// /// Gets or sets the associated entity. /// - [Association("Employee_Employee", "ManagerID", "EmployeeID", IsForeignKey=true)] + [EntityAssociation("Employee_Employee", new string[] { + "ManagerID"}, new string[] { + "EmployeeID"}, IsForeignKey=true)] public Employee Manager { get @@ -440,7 +441,9 @@ public string NationalIDNumber /// /// Gets the collection of associated entity instances. /// - [Association("Employee_PurchaseOrder", "EmployeeID", "EmployeeID")] + [EntityAssociation("Employee_PurchaseOrder", new string[] { + "EmployeeID"}, new string[] { + "EmployeeID"})] public EntityCollection PurchaseOrders { get @@ -456,7 +459,9 @@ public EntityCollection PurchaseOrders /// /// Gets the collection of associated entity instances. /// - [Association("Employee_Employee", "EmployeeID", "ManagerID")] + [EntityAssociation("Employee_Employee", new string[] { + "EmployeeID"}, new string[] { + "ManagerID"})] public EntityCollection Reports { get @@ -1260,7 +1265,9 @@ public Nullable ProductSubcategoryID /// /// Gets the collection of associated entity instances. /// - [Association("Product_PurchaseOrderDetail", "ProductID", "ProductID")] + [EntityAssociation("Product_PurchaseOrderDetail", new string[] { + "ProductID"}, new string[] { + "ProductID"})] public EntityCollection PurchaseOrderDetails { get @@ -1630,7 +1637,9 @@ public PurchaseOrder() /// /// Gets or sets the associated entity. /// - [Association("Employee_PurchaseOrder", "EmployeeID", "EmployeeID", IsForeignKey=true)] + [EntityAssociation("Employee_PurchaseOrder", new string[] { + "EmployeeID"}, new string[] { + "EmployeeID"}, IsForeignKey=true)] public Employee Employee { get @@ -1770,7 +1779,9 @@ public DateTime OrderDate /// /// Gets the collection of associated entity instances. /// - [Association("PurchaseOrder_PurchaseOrderDetail", "PurchaseOrderID", "PurchaseOrderID")] + [EntityAssociation("PurchaseOrder_PurchaseOrderDetail", new string[] { + "PurchaseOrderID"}, new string[] { + "PurchaseOrderID"})] public EntityCollection PurchaseOrderDetails { get @@ -2206,7 +2217,9 @@ public short OrderQty /// /// Gets or sets the associated entity. /// - [Association("Product_PurchaseOrderDetail", "ProductID", "ProductID", IsForeignKey=true)] + [EntityAssociation("Product_PurchaseOrderDetail", new string[] { + "ProductID"}, new string[] { + "ProductID"}, IsForeignKey=true)] public Product Product { get @@ -2274,7 +2287,9 @@ public int ProductID /// /// Gets or sets the associated entity. /// - [Association("PurchaseOrder_PurchaseOrderDetail", "PurchaseOrderID", "PurchaseOrderID", IsForeignKey=true)] + [EntityAssociation("PurchaseOrder_PurchaseOrderDetail", new string[] { + "PurchaseOrderID"}, new string[] { + "PurchaseOrderID"}, IsForeignKey=true)] public PurchaseOrder PurchaseOrder { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EF.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EF.g.vb index 4164ccfb0..3f0fb4244 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EF.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EF.g.vb @@ -1,7 +1,6 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.34209 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -312,7 +311,7 @@ Namespace AdventureWorksModel ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Manager() As Employee Get If (Me._manager Is Nothing) Then @@ -431,7 +430,7 @@ Namespace AdventureWorksModel ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property PurchaseOrders() As EntityCollection(Of PurchaseOrder) Get If (Me._purchaseOrders Is Nothing) Then @@ -444,7 +443,7 @@ Namespace AdventureWorksModel ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Reports() As EntityCollection(Of Employee) Get If (Me._reports Is Nothing) Then @@ -1214,7 +1213,7 @@ Namespace AdventureWorksModel ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property PurchaseOrderDetails() As EntityCollection(Of PurchaseOrderDetail) Get If (Me._purchaseOrderDetails Is Nothing) Then @@ -1568,7 +1567,7 @@ Namespace AdventureWorksModel ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Employee() As Employee Get If (Me._employee Is Nothing) Then @@ -1686,7 +1685,7 @@ Namespace AdventureWorksModel ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property PurchaseOrderDetails() As EntityCollection(Of PurchaseOrderDetail) Get If (Me._purchaseOrderDetails Is Nothing) Then @@ -2097,7 +2096,7 @@ Namespace AdventureWorksModel ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Product() As Product Get If (Me._product Is Nothing) Then @@ -2152,7 +2151,7 @@ Namespace AdventureWorksModel ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property PurchaseOrder() As PurchaseOrder Get If (Me._purchaseOrder Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EFCore.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EFCore.g.cs index 627ff4311..7cc607d49 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EFCore.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EFCore.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -292,7 +291,9 @@ public string LoginID /// /// Gets or sets the associated entity. /// - [Association("FK_Employee_Employee_ManagerID", "ManagerID", "EmployeeID", IsForeignKey=true)] + [EntityAssociation("FK_Employee_Employee_ManagerID", new string[] { + "ManagerID"}, new string[] { + "EmployeeID"}, IsForeignKey=true)] public Employee Manager { get @@ -1184,7 +1185,9 @@ public Nullable ProductSubcategoryID /// /// Gets the collection of associated entity instances. /// - [Association("FK_PurchaseOrderDetail_Product_ProductID", "ProductID", "ProductID")] + [EntityAssociation("FK_PurchaseOrderDetail_Product_ProductID", new string[] { + "ProductID"}, new string[] { + "ProductID"})] public EntityCollection PurchaseOrderDetails { get @@ -1646,7 +1649,9 @@ public DateTime OrderDate /// /// Gets the collection of associated entity instances. /// - [Association("FK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID", "PurchaseOrderID", "PurchaseOrderID")] + [EntityAssociation("FK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID", new string[] { + "PurchaseOrderID"}, new string[] { + "PurchaseOrderID"})] public EntityCollection PurchaseOrderDetails { get @@ -2075,7 +2080,9 @@ public short OrderQty /// /// Gets or sets the associated entity. /// - [Association("FK_PurchaseOrderDetail_Product_ProductID", "ProductID", "ProductID", IsForeignKey=true)] + [EntityAssociation("FK_PurchaseOrderDetail_Product_ProductID", new string[] { + "ProductID"}, new string[] { + "ProductID"}, IsForeignKey=true)] public Product Product { get @@ -2143,7 +2150,9 @@ public int ProductID /// /// Gets or sets the associated entity. /// - [Association("FK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID", "PurchaseOrderID", "PurchaseOrderID", IsForeignKey=true)] + [EntityAssociation("FK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID", new string[] { + "PurchaseOrderID"}, new string[] { + "PurchaseOrderID"}, IsForeignKey=true)] public PurchaseOrder PurchaseOrder { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EFCore.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EFCore.g.vb index ca5a9c6e6..2e40f6825 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EFCore.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EFCore.g.vb @@ -1,7 +1,6 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -308,7 +307,7 @@ Namespace EFCoreModels.AdventureWorks ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Manager() As Employee Get If (Me._manager Is Nothing) Then @@ -1152,7 +1151,7 @@ Namespace EFCoreModels.AdventureWorks ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property PurchaseOrderDetails() As EntityCollection(Of PurchaseOrderDetail) Get If (Me._purchaseOrderDetails Is Nothing) Then @@ -1586,7 +1585,7 @@ Namespace EFCoreModels.AdventureWorks ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property PurchaseOrderDetails() As EntityCollection(Of PurchaseOrderDetail) Get If (Me._purchaseOrderDetails Is Nothing) Then @@ -1991,7 +1990,7 @@ Namespace EFCoreModels.AdventureWorks ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Product() As Product Get If (Me._product Is Nothing) Then @@ -2046,7 +2045,7 @@ Namespace EFCoreModels.AdventureWorks ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property PurchaseOrder() As PurchaseOrder Get If (Me._purchaseOrder Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EFDbCtx.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EFDbCtx.g.cs index 557a6b84c..d76ed628b 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EFDbCtx.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EFDbCtx.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -296,7 +295,9 @@ public string LoginID /// /// Gets or sets the associated entity. /// - [Association("Employee_Employee", "ManagerID", "EmployeeID", IsForeignKey=true)] + [EntityAssociation("Employee_Employee", new string[] { + "ManagerID"}, new string[] { + "EmployeeID"}, IsForeignKey=true)] public Employee Manager { get @@ -440,7 +441,9 @@ public string NationalIDNumber /// /// Gets the collection of associated entity instances. /// - [Association("Employee_PurchaseOrder", "EmployeeID", "EmployeeID")] + [EntityAssociation("Employee_PurchaseOrder", new string[] { + "EmployeeID"}, new string[] { + "EmployeeID"})] public EntityCollection PurchaseOrders { get @@ -456,7 +459,9 @@ public EntityCollection PurchaseOrders /// /// Gets the collection of associated entity instances. /// - [Association("Employee_Employee", "EmployeeID", "ManagerID")] + [EntityAssociation("Employee_Employee", new string[] { + "EmployeeID"}, new string[] { + "ManagerID"})] public EntityCollection Reports { get @@ -1260,7 +1265,9 @@ public Nullable ProductSubcategoryID /// /// Gets the collection of associated entity instances. /// - [Association("Product_PurchaseOrderDetail", "ProductID", "ProductID")] + [EntityAssociation("Product_PurchaseOrderDetail", new string[] { + "ProductID"}, new string[] { + "ProductID"})] public EntityCollection PurchaseOrderDetails { get @@ -1630,7 +1637,9 @@ public PurchaseOrder() /// /// Gets or sets the associated entity. /// - [Association("Employee_PurchaseOrder", "EmployeeID", "EmployeeID", IsForeignKey=true)] + [EntityAssociation("Employee_PurchaseOrder", new string[] { + "EmployeeID"}, new string[] { + "EmployeeID"}, IsForeignKey=true)] public Employee Employee { get @@ -1770,7 +1779,9 @@ public DateTime OrderDate /// /// Gets the collection of associated entity instances. /// - [Association("PurchaseOrder_PurchaseOrderDetail", "PurchaseOrderID", "PurchaseOrderID")] + [EntityAssociation("PurchaseOrder_PurchaseOrderDetail", new string[] { + "PurchaseOrderID"}, new string[] { + "PurchaseOrderID"})] public EntityCollection PurchaseOrderDetails { get @@ -2206,7 +2217,9 @@ public short OrderQty /// /// Gets or sets the associated entity. /// - [Association("Product_PurchaseOrderDetail", "ProductID", "ProductID", IsForeignKey=true)] + [EntityAssociation("Product_PurchaseOrderDetail", new string[] { + "ProductID"}, new string[] { + "ProductID"}, IsForeignKey=true)] public Product Product { get @@ -2274,7 +2287,9 @@ public int ProductID /// /// Gets or sets the associated entity. /// - [Association("PurchaseOrder_PurchaseOrderDetail", "PurchaseOrderID", "PurchaseOrderID", IsForeignKey=true)] + [EntityAssociation("PurchaseOrder_PurchaseOrderDetail", new string[] { + "PurchaseOrderID"}, new string[] { + "PurchaseOrderID"}, IsForeignKey=true)] public PurchaseOrder PurchaseOrder { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EFDbCtx.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EFDbCtx.g.vb index 732334525..d57ddc666 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EFDbCtx.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Catalog_EFDbCtx.g.vb @@ -1,7 +1,6 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.34209 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -312,7 +311,7 @@ Namespace DbContextModels.AdventureWorks ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Manager() As Employee Get If (Me._manager Is Nothing) Then @@ -431,7 +430,7 @@ Namespace DbContextModels.AdventureWorks ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property PurchaseOrders() As EntityCollection(Of PurchaseOrder) Get If (Me._purchaseOrders Is Nothing) Then @@ -444,7 +443,7 @@ Namespace DbContextModels.AdventureWorks ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Reports() As EntityCollection(Of Employee) Get If (Me._reports Is Nothing) Then @@ -1214,7 +1213,7 @@ Namespace DbContextModels.AdventureWorks ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property PurchaseOrderDetails() As EntityCollection(Of PurchaseOrderDetail) Get If (Me._purchaseOrderDetails Is Nothing) Then @@ -1568,7 +1567,7 @@ Namespace DbContextModels.AdventureWorks ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Employee() As Employee Get If (Me._employee Is Nothing) Then @@ -1686,7 +1685,7 @@ Namespace DbContextModels.AdventureWorks ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property PurchaseOrderDetails() As EntityCollection(Of PurchaseOrderDetail) Get If (Me._purchaseOrderDetails Is Nothing) Then @@ -2097,7 +2096,7 @@ Namespace DbContextModels.AdventureWorks ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Product() As Product Get If (Me._product Is Nothing) Then @@ -2152,7 +2151,7 @@ Namespace DbContextModels.AdventureWorks ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property PurchaseOrder() As PurchaseOrder Get If (Me._purchaseOrder Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Northwind_EF.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Northwind_EF.g.cs index 2b2152046..d483af373 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Northwind_EF.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Northwind_EF.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -170,7 +169,9 @@ public byte[] Picture /// /// Gets the collection of associated entity instances. /// - [Association("Category_Product", "CategoryID", "CategoryID")] + [EntityAssociation("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"})] public EntityCollection Products { get @@ -502,7 +503,9 @@ public string Fax /// /// Gets the collection of associated entity instances. /// - [Association("Customer_Order", "CustomerID", "CustomerID")] + [EntityAssociation("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"})] public EntityCollection Orders { get @@ -714,7 +717,9 @@ public Order() /// /// Gets or sets the associated entity. /// - [Association("Customer_Order", "CustomerID", "CustomerID", IsForeignKey=true)] + [EntityAssociation("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"}, IsForeignKey=true)] public Customer Customer { get @@ -861,7 +866,9 @@ public Nullable Freight /// /// Gets the collection of associated entity instances. /// - [Association("Order_Order_Detail", "OrderID", "OrderID")] + [EntityAssociation("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"})] public EntityCollection Order_Details { get @@ -1276,7 +1283,9 @@ public float Discount /// /// Gets or sets the associated entity. /// - [Association("Order_Order_Detail", "OrderID", "OrderID", IsForeignKey=true)] + [EntityAssociation("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"}, IsForeignKey=true)] public Order Order { get @@ -1346,7 +1355,9 @@ public int OrderID /// /// Gets or sets the associated entity. /// - [Association("Product_Order_Detail", "ProductID", "ProductID", IsForeignKey=true)] + [EntityAssociation("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"}, IsForeignKey=true)] public Product Product { get @@ -1572,7 +1583,9 @@ public Product() /// /// Gets or sets the associated entity. /// - [Association("Category_Product", "CategoryID", "CategoryID", IsForeignKey=true)] + [EntityAssociation("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"}, IsForeignKey=true)] public Category Category { get @@ -1692,7 +1705,9 @@ public bool Discontinued /// /// Gets the collection of associated entity instances. /// - [Association("Product_Order_Detail", "ProductID", "ProductID")] + [EntityAssociation("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"})] public EntityCollection Order_Details { get @@ -2270,8 +2285,10 @@ public int RegionID /// /// Gets the collection of associated entity instances. /// - [Association("Region_Territory", "RegionID", "RegionID")] [Composition()] + [EntityAssociation("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"})] public EntityCollection Territories { get @@ -2352,7 +2369,9 @@ public Territory() /// /// Gets or sets the associated entity. /// - [Association("Region_Territory", "RegionID", "RegionID", IsForeignKey=true)] + [EntityAssociation("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"}, IsForeignKey=true)] public Region Region { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Northwind_EF.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Northwind_EF.g.vb index 0682a5baf..afdc7ab26 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Northwind_EF.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Northwind_EF.g.vb @@ -1,7 +1,6 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.34209 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -170,7 +169,7 @@ Namespace NorthwindModel ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Products() As EntityCollection(Of Product) Get If (Me._products Is Nothing) Then @@ -486,7 +485,7 @@ Namespace NorthwindModel ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Orders() As EntityCollection(Of Order) Get If (Me._orders Is Nothing) Then @@ -710,7 +709,7 @@ Namespace NorthwindModel ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Customer() As Customer Get If (Me._customer Is Nothing) Then @@ -831,7 +830,7 @@ Namespace NorthwindModel ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Order_Details() As EntityCollection(Of Order_Detail) Get If (Me._order_Details Is Nothing) Then @@ -1203,7 +1202,7 @@ Namespace NorthwindModel ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Order() As Order Get If (Me._order Is Nothing) Then @@ -1260,7 +1259,7 @@ Namespace NorthwindModel ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Product() As Product Get If (Me._product Is Nothing) Then @@ -1493,7 +1492,7 @@ Namespace NorthwindModel ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Category() As Category Get If (Me._category Is Nothing) Then @@ -1592,7 +1591,7 @@ Namespace NorthwindModel ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Order_Details() As EntityCollection(Of Order_Detail) Get If (Me._order_Details Is Nothing) Then @@ -2109,8 +2108,8 @@ Namespace NorthwindModel ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Territories() As EntityCollection(Of Territory) Get If (Me._territories Is Nothing) Then @@ -2191,7 +2190,7 @@ Namespace NorthwindModel ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Region() As Region Get If (Me._region Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Northwind_EFCore.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Northwind_EFCore.g.cs index 1696448d3..07944688c 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Northwind_EFCore.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Northwind_EFCore.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -170,7 +169,9 @@ public byte[] Picture /// /// Gets the collection of associated entity instances. /// - [Association("Category_Product", "CategoryID", "CategoryID")] + [EntityAssociation("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"})] public EntityCollection Products { get @@ -502,7 +503,9 @@ public string Fax /// /// Gets the collection of associated entity instances. /// - [Association("Customer_Order", "CustomerID", "CustomerID")] + [EntityAssociation("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"})] public EntityCollection Orders { get @@ -714,7 +717,9 @@ public Order() /// /// Gets or sets the associated entity. /// - [Association("Customer_Order", "CustomerID", "CustomerID", IsForeignKey=true)] + [EntityAssociation("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"}, IsForeignKey=true)] public Customer Customer { get @@ -861,7 +866,9 @@ public Nullable Freight /// /// Gets the collection of associated entity instances. /// - [Association("Order_Order_Detail", "OrderID", "OrderID")] + [EntityAssociation("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"})] public EntityCollection Order_Details { get @@ -1276,7 +1283,9 @@ public float Discount /// /// Gets or sets the associated entity. /// - [Association("Order_Order_Detail", "OrderID", "OrderID", IsForeignKey=true)] + [EntityAssociation("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"}, IsForeignKey=true)] public Order Order { get @@ -1346,7 +1355,9 @@ public int OrderID /// /// Gets or sets the associated entity. /// - [Association("Product_Order_Detail", "ProductID", "ProductID", IsForeignKey=true)] + [EntityAssociation("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"}, IsForeignKey=true)] public Product Product { get @@ -1572,7 +1583,9 @@ public Product() /// /// Gets or sets the associated entity. /// - [Association("Category_Product", "CategoryID", "CategoryID", IsForeignKey=true)] + [EntityAssociation("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"}, IsForeignKey=true)] public Category Category { get @@ -1692,7 +1705,9 @@ public bool Discontinued /// /// Gets the collection of associated entity instances. /// - [Association("Product_Order_Detail", "ProductID", "ProductID")] + [EntityAssociation("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"})] public EntityCollection Order_Details { get @@ -2270,8 +2285,10 @@ public int RegionID /// /// Gets the collection of associated entity instances. /// - [Association("Region_Territory", "RegionID", "RegionID")] [Composition()] + [EntityAssociation("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"})] public EntityCollection Territories { get @@ -2352,7 +2369,9 @@ public Territory() /// /// Gets or sets the associated entity. /// - [Association("Region_Territory", "RegionID", "RegionID", IsForeignKey=true)] + [EntityAssociation("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"}, IsForeignKey=true)] public Region Region { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Northwind_EFCore.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Northwind_EFCore.g.vb index 5251ad2cb..13e048d77 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Northwind_EFCore.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/EF/Northwind_EFCore.g.vb @@ -1,7 +1,6 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -170,7 +169,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Products() As EntityCollection(Of Product) Get If (Me._products Is Nothing) Then @@ -486,7 +485,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Orders() As EntityCollection(Of Order) Get If (Me._orders Is Nothing) Then @@ -710,7 +709,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Customer() As Customer Get If (Me._customer Is Nothing) Then @@ -831,7 +830,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Order_Details() As EntityCollection(Of Order_Detail) Get If (Me._order_Details Is Nothing) Then @@ -1203,7 +1202,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Order() As Order Get If (Me._order Is Nothing) Then @@ -1260,7 +1259,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Product() As Product Get If (Me._product Is Nothing) Then @@ -1493,7 +1492,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Category() As Category Get If (Me._category Is Nothing) Then @@ -1592,7 +1591,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Order_Details() As EntityCollection(Of Order_Detail) Get If (Me._order_Details Is Nothing) Then @@ -2109,8 +2108,8 @@ Namespace EFCoreModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Territories() As EntityCollection(Of Territory) Get If (Me._territories Is Nothing) Then @@ -2191,7 +2190,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Region() As Region Get If (Me._region Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/LTS/Catalog_LTS.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/LTS/Catalog_LTS.g.cs index 8eac6fdc3..5c580f005 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/LTS/Catalog_LTS.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/LTS/Catalog_LTS.g.cs @@ -308,7 +308,9 @@ public string LoginID /// /// Gets or sets the associated entity. /// - [Association("Employee_Employee", "ManagerID", "EmployeeID", IsForeignKey=true)] + [EntityAssociation("Employee_Employee", new string[] { + "ManagerID"}, new string[] { + "EmployeeID"}, IsForeignKey=true)] public Employee Manager { get @@ -459,7 +461,9 @@ public string NationalIDNumber /// /// Gets the collection of associated entity instances. /// - [Association("Employee_PurchaseOrder", "EmployeeID", "EmployeeID")] + [EntityAssociation("Employee_PurchaseOrder", new string[] { + "EmployeeID"}, new string[] { + "EmployeeID"})] public EntityCollection PurchaseOrders { get @@ -475,7 +479,9 @@ public EntityCollection PurchaseOrders /// /// Gets the collection of associated entity instances. /// - [Association("Employee_Employee", "EmployeeID", "ManagerID")] + [EntityAssociation("Employee_Employee", new string[] { + "EmployeeID"}, new string[] { + "ManagerID"})] public EntityCollection Reports { get @@ -1164,7 +1170,9 @@ public Nullable ProductSubcategoryID /// /// Gets the collection of associated entity instances. /// - [Association("Product_PurchaseOrderDetail", "ProductID", "ProductID")] + [EntityAssociation("Product_PurchaseOrderDetail", new string[] { + "ProductID"}, new string[] { + "ProductID"})] public EntityCollection PurchaseOrderDetails { get @@ -1551,7 +1559,9 @@ public PurchaseOrder() /// /// Gets or sets the associated entity. /// - [Association("Employee_PurchaseOrder", "EmployeeID", "EmployeeID", IsForeignKey=true)] + [EntityAssociation("Employee_PurchaseOrder", new string[] { + "EmployeeID"}, new string[] { + "EmployeeID"}, IsForeignKey=true)] public Employee Employee { get @@ -1698,7 +1708,9 @@ public DateTime OrderDate /// /// Gets the collection of associated entity instances. /// - [Association("PurchaseOrder_PurchaseOrderDetail", "PurchaseOrderID", "PurchaseOrderID")] + [EntityAssociation("PurchaseOrder_PurchaseOrderDetail", new string[] { + "PurchaseOrderID"}, new string[] { + "PurchaseOrderID"})] public EntityCollection PurchaseOrderDetails { get @@ -2155,7 +2167,9 @@ public short OrderQty /// /// Gets or sets the associated entity. /// - [Association("Product_PurchaseOrderDetail", "ProductID", "ProductID", IsForeignKey=true)] + [EntityAssociation("Product_PurchaseOrderDetail", new string[] { + "ProductID"}, new string[] { + "ProductID"}, IsForeignKey=true)] public Product Product { get @@ -2224,7 +2238,9 @@ public int ProductID /// /// Gets or sets the associated entity. /// - [Association("PurchaseOrder_PurchaseOrderDetail", "PurchaseOrderID", "PurchaseOrderID", IsForeignKey=true)] + [EntityAssociation("PurchaseOrder_PurchaseOrderDetail", new string[] { + "PurchaseOrderID"}, new string[] { + "PurchaseOrderID"}, IsForeignKey=true)] public PurchaseOrder PurchaseOrder { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/LTS/Catalog_LTS.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/LTS/Catalog_LTS.g.vb index 3a0ca2fd3..b5c98b882 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/LTS/Catalog_LTS.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/LTS/Catalog_LTS.g.vb @@ -324,7 +324,7 @@ Namespace DataTests.AdventureWorks.LTS ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Manager() As Employee Get If (Me._manager Is Nothing) Then @@ -450,7 +450,7 @@ Namespace DataTests.AdventureWorks.LTS ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property PurchaseOrders() As EntityCollection(Of PurchaseOrder) Get If (Me._purchaseOrders Is Nothing) Then @@ -463,7 +463,7 @@ Namespace DataTests.AdventureWorks.LTS ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Reports() As EntityCollection(Of Employee) Get If (Me._reports Is Nothing) Then @@ -1124,7 +1124,7 @@ Namespace DataTests.AdventureWorks.LTS ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property PurchaseOrderDetails() As EntityCollection(Of PurchaseOrderDetail) Get If (Me._purchaseOrderDetails Is Nothing) Then @@ -1495,7 +1495,7 @@ Namespace DataTests.AdventureWorks.LTS ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Employee() As Employee Get If (Me._employee Is Nothing) Then @@ -1620,7 +1620,7 @@ Namespace DataTests.AdventureWorks.LTS ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property PurchaseOrderDetails() As EntityCollection(Of PurchaseOrderDetail) Get If (Me._purchaseOrderDetails Is Nothing) Then @@ -2052,7 +2052,7 @@ Namespace DataTests.AdventureWorks.LTS ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Product() As Product Get If (Me._product Is Nothing) Then @@ -2108,7 +2108,7 @@ Namespace DataTests.AdventureWorks.LTS ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property PurchaseOrder() As PurchaseOrder Get If (Me._purchaseOrder Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/LTS/Northwind_LTS.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/LTS/Northwind_LTS.g.cs index d1c03e823..a4ee800ea 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/LTS/Northwind_LTS.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/LTS/Northwind_LTS.g.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -173,7 +173,9 @@ public byte[] Picture /// /// Gets the collection of associated entity instances. /// - [Association("Category_Product", "CategoryID", "CategoryID")] + [EntityAssociation("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"})] public EntityCollection Products { get @@ -505,7 +507,9 @@ public string Fax /// /// Gets the collection of associated entity instances. /// - [Association("Customer_Order", "CustomerID", "CustomerID")] + [EntityAssociation("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"})] public EntityCollection Orders { get @@ -717,7 +721,9 @@ public Order() /// /// Gets or sets the associated entity. /// - [Association("Customer_Order", "CustomerID", "CustomerID", IsForeignKey=true)] + [EntityAssociation("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"}, IsForeignKey=true)] public Customer Customer { get @@ -865,7 +871,9 @@ public Nullable Freight /// /// Gets the collection of associated entity instances. /// - [Association("Order_Order_Detail", "OrderID", "OrderID")] + [EntityAssociation("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"})] public EntityCollection Order_Details { get @@ -1280,7 +1288,9 @@ public float Discount /// /// Gets or sets the associated entity. /// - [Association("Order_Order_Detail", "OrderID", "OrderID", IsForeignKey=true)] + [EntityAssociation("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"}, IsForeignKey=true)] public Order Order { get @@ -1350,7 +1360,9 @@ public int OrderID /// /// Gets or sets the associated entity. /// - [Association("Product_Order_Detail", "ProductID", "ProductID", IsForeignKey=true)] + [EntityAssociation("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"}, IsForeignKey=true)] public Product Product { get @@ -1576,7 +1588,9 @@ public Product() /// /// Gets or sets the associated entity. /// - [Association("Category_Product", "CategoryID", "CategoryID", IsForeignKey=true)] + [EntityAssociation("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"}, IsForeignKey=true)] public Category Category { get @@ -1696,7 +1710,9 @@ public bool Discontinued /// /// Gets the collection of associated entity instances. /// - [Association("Product_Order_Detail", "ProductID", "ProductID")] + [EntityAssociation("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"})] public EntityCollection Order_Details { get @@ -2278,8 +2294,10 @@ public int RegionID /// /// Gets the collection of associated entity instances. /// - [Association("Region_Territory", "RegionID", "RegionID")] [Composition()] + [EntityAssociation("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"})] public EntityCollection Territories { get @@ -2360,7 +2378,9 @@ public Territory() /// /// Gets or sets the associated entity. /// - [Association("Region_Territory", "RegionID", "RegionID", IsForeignKey=true)] + [EntityAssociation("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"}, IsForeignKey=true)] public Region Region { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/LTS/Northwind_LTS.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/LTS/Northwind_LTS.g.vb index ac5228ae6..bd3de8964 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/LTS/Northwind_LTS.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/LTS/Northwind_LTS.g.vb @@ -1,7 +1,7 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.34209 +' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -173,7 +173,7 @@ Namespace DataTests.Northwind.LTS ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Products() As EntityCollection(Of Product) Get If (Me._products Is Nothing) Then @@ -489,7 +489,7 @@ Namespace DataTests.Northwind.LTS ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Orders() As EntityCollection(Of Order) Get If (Me._orders Is Nothing) Then @@ -713,7 +713,7 @@ Namespace DataTests.Northwind.LTS ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Customer() As Customer Get If (Me._customer Is Nothing) Then @@ -835,7 +835,7 @@ Namespace DataTests.Northwind.LTS ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Order_Details() As EntityCollection(Of Order_Detail) Get If (Me._order_Details Is Nothing) Then @@ -1207,7 +1207,7 @@ Namespace DataTests.Northwind.LTS ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Order() As Order Get If (Me._order Is Nothing) Then @@ -1264,7 +1264,7 @@ Namespace DataTests.Northwind.LTS ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Product() As Product Get If (Me._product Is Nothing) Then @@ -1497,7 +1497,7 @@ Namespace DataTests.Northwind.LTS ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Category() As Category Get If (Me._category Is Nothing) Then @@ -1596,7 +1596,7 @@ Namespace DataTests.Northwind.LTS ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Order_Details() As EntityCollection(Of Order_Detail) Get If (Me._order_Details Is Nothing) Then @@ -2117,8 +2117,8 @@ Namespace DataTests.Northwind.LTS ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Territories() As EntityCollection(Of Territory) Get If (Me._territories Is Nothing) Then @@ -2199,7 +2199,7 @@ Namespace DataTests.Northwind.LTS ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Region() As Region Get If (Me._region Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Mocks/MockCustomers.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Mocks/MockCustomers.g.cs index a1a1a7039..4e768dab7 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Mocks/MockCustomers.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Mocks/MockCustomers.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -70,7 +69,11 @@ public MockCustomer() /// /// Gets or sets the associated entity. /// - [Association("Customer_City", "CityName,StateName", "Name,StateName", IsForeignKey=true)] + [EntityAssociation("Customer_City", new string[] { + "CityName", + "StateName"}, new string[] { + "Name", + "StateName"}, IsForeignKey=true)] [ExternalReference()] public global::Cities.City City { @@ -156,7 +159,9 @@ public int CustomerId /// /// Gets the collection of associated entity instances. /// - [Association("Customer_PreviousResidences", "StateName", "StateName")] + [EntityAssociation("Customer_PreviousResidences", new string[] { + "StateName"}, new string[] { + "StateName"})] [ExternalReference()] public EntityCollection PreviousResidences { @@ -496,7 +501,9 @@ public MockReport() /// /// Gets or sets the associated entity. /// - [Association("R_C", "CustomerId", "CustomerId")] + [EntityAssociation("R_C", new string[] { + "CustomerId"}, new string[] { + "CustomerId"})] public MockCustomer Customer { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Mocks/MockCustomers.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Mocks/MockCustomers.g.vb index 4c4bea418..29da4ecca 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Mocks/MockCustomers.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Mocks/MockCustomers.g.vb @@ -1,7 +1,6 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.34209 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -83,7 +82,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ Public Property City() As Global.Cities.City Get @@ -154,7 +153,7 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ Public ReadOnly Property PreviousResidences() As EntityCollection(Of Global.Cities.City) Get @@ -481,7 +480,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Customer() As MockCustomer Get If (Me._customer Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/AttributeThrowing.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/AttributeThrowing.g.cs index 022b389ac..7d3cbddcf 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/AttributeThrowing.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/AttributeThrowing.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -337,7 +336,9 @@ public string NonThrowingProperty // // - An exception occurred generating the 'ThrowingEntityAssociationAttributeProperty' property on attribute of type 'TestDomainServices.ThrowingEntityAssociationAttribute'. // - [Association("Association", "ThrowingProperty", "NonThrowingProperty", IsForeignKey=true)] + [EntityAssociation("Association", new string[] { + "ThrowingProperty"}, new string[] { + "NonThrowingProperty"}, IsForeignKey=true)] public AttributeThrowingEntity ThrowingAssociation { get @@ -375,7 +376,9 @@ public AttributeThrowingEntity ThrowingAssociation // // - An exception occurred generating the 'ThrowingEntityAssociationCollectionAttributeProperty' property on attribute of type 'TestDomainServices.ThrowingEntityAssociationCollectionAttribute'. // - [Association("AssociationCollection", "NonThrowingProperty", "ThrowingProperty")] + [EntityAssociation("AssociationCollection", new string[] { + "NonThrowingProperty"}, new string[] { + "ThrowingProperty"})] public EntityCollection ThrowingAssociationCollection { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/AttributeThrowing.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/AttributeThrowing.g.vb index 77f60600d..ccae84cd6 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/AttributeThrowing.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/AttributeThrowing.g.vb @@ -1,7 +1,6 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.34209 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -333,7 +332,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property ThrowingAssociation() As AttributeThrowingEntity Get If (Me._throwingAssociation Is Nothing) Then @@ -363,7 +362,7 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property ThrowingAssociationCollection() As EntityCollection(Of AttributeThrowingEntity) Get If (Me._throwingAssociationCollection Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/CompositionInheritanceScenarios.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/CompositionInheritanceScenarios.g.cs index 553dd8cad..27301b9eb 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/CompositionInheritanceScenarios.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/CompositionInheritanceScenarios.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -152,7 +151,9 @@ public AI_DetailDerived1() /// /// Gets or sets the associated entity. /// - [Association("Master_to_Derived1_Many", "MasterID", "ID", IsForeignKey=true)] + [EntityAssociation("Master_to_Derived1_Many", new string[] { + "MasterID"}, new string[] { + "ID"}, IsForeignKey=true)] public AI_MasterDerived Master { get @@ -229,7 +230,9 @@ public AI_DetailDerived2() /// /// Gets or sets the associated entity. /// - [Association("Master_to_Derived2_Many", "MasterID", "ID", IsForeignKey=true)] + [EntityAssociation("Master_to_Derived2_Many", new string[] { + "MasterID"}, new string[] { + "ID"}, IsForeignKey=true)] public AI_MasterDerived Master { get @@ -306,7 +309,9 @@ public AI_DetailDerived3() /// /// Gets or sets the associated entity. /// - [Association("Master_to_Derived3_One", "MasterID", "ID", IsForeignKey=true)] + [EntityAssociation("Master_to_Derived3_One", new string[] { + "MasterID"}, new string[] { + "ID"}, IsForeignKey=true)] public AI_MasterDerived Master { get @@ -383,7 +388,9 @@ public AI_DetailDerived4() /// /// Gets or sets the associated entity. /// - [Association("Master_to_Derived4_One", "MasterID", "ID", IsForeignKey=true)] + [EntityAssociation("Master_to_Derived4_One", new string[] { + "MasterID"}, new string[] { + "ID"}, IsForeignKey=true)] public AI_MasterDerived Master { get @@ -533,7 +540,9 @@ public AI_MasterDerived() /// /// Gets the collection of associated entity instances. /// - [Association("Master_to_Derived1_Many", "ID", "MasterID")] + [EntityAssociation("Master_to_Derived1_Many", new string[] { + "ID"}, new string[] { + "MasterID"})] public EntityCollection DetailDerived1s { get @@ -549,7 +558,9 @@ public EntityCollection DetailDerived1s /// /// Gets the collection of associated entity instances. /// - [Association("Master_to_Derived2_Many", "ID", "MasterID")] + [EntityAssociation("Master_to_Derived2_Many", new string[] { + "ID"}, new string[] { + "MasterID"})] public EntityCollection DetailDerived2s { get @@ -565,7 +576,9 @@ public EntityCollection DetailDerived2s /// /// Gets or sets the associated entity. /// - [Association("Master_to_Derived3_One", "ID", "MasterID")] + [EntityAssociation("Master_to_Derived3_One", new string[] { + "ID"}, new string[] { + "MasterID"})] public AI_DetailDerived3 DetailDerived3 { get @@ -600,7 +613,9 @@ public AI_DetailDerived3 DetailDerived3 /// /// Gets or sets the associated entity. /// - [Association("Master_to_Derived4_One", "ID", "MasterID")] + [EntityAssociation("Master_to_Derived4_One", new string[] { + "ID"}, new string[] { + "MasterID"})] public AI_DetailDerived4 DetailDerived4 { get @@ -1030,7 +1045,9 @@ public string OperationResult /// /// Gets or sets the associated entity. /// - [Association("Child_Parent", "ParentID", "ID", IsForeignKey=true)] + [EntityAssociation("Child_Parent", new string[] { + "ParentID"}, new string[] { + "ID"}, IsForeignKey=true)] public CI_Parent Parent { get @@ -1215,8 +1232,10 @@ public CI_Parent() /// /// Gets the collection of associated entity instances. /// - [Association("Child_Parent", "ID", "ParentID")] [Composition()] + [EntityAssociation("Child_Parent", new string[] { + "ID"}, new string[] { + "ParentID"})] public EntityCollection Children { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/CompositionInheritanceScenarios.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/CompositionInheritanceScenarios.g.vb index 2adc85ef1..f2a854d18 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/CompositionInheritanceScenarios.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/CompositionInheritanceScenarios.g.vb @@ -1,7 +1,6 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.34209 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -155,7 +154,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Master() As AI_MasterDerived Get If (Me._master Is Nothing) Then @@ -222,7 +221,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Master() As AI_MasterDerived Get If (Me._master Is Nothing) Then @@ -289,7 +288,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Master() As AI_MasterDerived Get If (Me._master Is Nothing) Then @@ -356,7 +355,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Master() As AI_MasterDerived Get If (Me._master Is Nothing) Then @@ -495,7 +494,7 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property DetailDerived1s() As EntityCollection(Of AI_DetailDerived1) Get If (Me._detailDerived1s Is Nothing) Then @@ -508,7 +507,7 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property DetailDerived2s() As EntityCollection(Of AI_DetailDerived2) Get If (Me._detailDerived2s Is Nothing) Then @@ -521,7 +520,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property DetailDerived3() As AI_DetailDerived3 Get If (Me._detailDerived3 Is Nothing) Then @@ -549,7 +548,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property DetailDerived4() As AI_DetailDerived4 Get If (Me._detailDerived4 Is Nothing) Then @@ -955,7 +954,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Parent() As CI_Parent Get If (Me._parent Is Nothing) Then @@ -1125,8 +1124,8 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Children() As EntityCollection(Of CI_Child) Get If (Me._children Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/CompositionScenarios.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/CompositionScenarios.g.cs index 46bf1bf17..a9f2faa90 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/CompositionScenarios.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/CompositionScenarios.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -74,8 +73,10 @@ public Child() /// /// Gets the collection of associated entity instances. /// - [Association("GrandChild_Child", "ID", "ParentID")] [Composition()] + [EntityAssociation("GrandChild_Child", new string[] { + "ID"}, new string[] { + "ParentID"})] public EntityCollection Children { get @@ -141,7 +142,9 @@ public string OperationResult /// /// Gets or sets the associated entity. /// - [Association("Child_Parent", "ParentID", "ID", IsForeignKey=true)] + [EntityAssociation("Child_Parent", new string[] { + "ParentID"}, new string[] { + "ID"}, IsForeignKey=true)] public Parent Parent { get @@ -388,7 +391,9 @@ public int ID /// /// Gets or sets the associated entity. /// - [Association("Parent_Child", "ParentID", "ID", IsForeignKey=true)] + [EntityAssociation("Parent_Child", new string[] { + "ParentID"}, new string[] { + "ID"}, IsForeignKey=true)] public CompositionScenarios_Parent Parent { get @@ -696,8 +701,10 @@ public string A /// /// Gets the collection of associated entity instances. /// - [Association("Parent_Child", "ID", "ParentID")] [Composition()] + [EntityAssociation("Parent_Child", new string[] { + "ID"}, new string[] { + "ParentID"})] public EntityCollection Children { get @@ -1051,8 +1058,10 @@ public GrandChild() /// /// Gets or sets the associated entity. /// - [Association("GreatGrandChild_GrandChild", "ID", "ParentID")] [Composition()] + [EntityAssociation("GreatGrandChild_GrandChild", new string[] { + "ID"}, new string[] { + "ParentID"})] public GreatGrandChild Child { get @@ -1137,7 +1146,9 @@ public string OperationResult /// /// Gets or sets the associated entity. /// - [Association("GrandChild_Child", "ParentID", "ID", IsForeignKey=true)] + [EntityAssociation("GrandChild_Child", new string[] { + "ParentID"}, new string[] { + "ID"}, IsForeignKey=true)] public Child Parent { get @@ -1380,7 +1391,9 @@ public string OperationResult /// /// Gets or sets the associated entity. /// - [Association("GreatGrandChild_GrandChild", "ParentID", "ID", IsForeignKey=true)] + [EntityAssociation("GreatGrandChild_GrandChild", new string[] { + "ParentID"}, new string[] { + "ID"}, IsForeignKey=true)] public GrandChild Parent { get @@ -1564,8 +1577,10 @@ public Parent() /// /// Gets the collection of associated entity instances. /// - [Association("Child_Parent", "ID", "ParentID")] [Composition()] + [EntityAssociation("Child_Parent", new string[] { + "ID"}, new string[] { + "ParentID"})] public EntityCollection Children { get @@ -1757,8 +1772,10 @@ public SelfReferencingComposition() /// /// Gets or sets the associated entity. /// - [Association("Ref_Assoc", "ID", "ParentID")] [Composition()] + [EntityAssociation("Ref_Assoc", new string[] { + "ID"}, new string[] { + "ParentID"})] public SelfReferencingComposition Child { get @@ -1819,7 +1836,9 @@ public int ID /// /// Gets or sets the associated entity. /// - [Association("Ref_Assoc", "ParentID", "ID", IsForeignKey=true)] + [EntityAssociation("Ref_Assoc", new string[] { + "ParentID"}, new string[] { + "ID"}, IsForeignKey=true)] public SelfReferencingComposition Parent { get @@ -1973,8 +1992,10 @@ public SelfReferencingComposition_OneToMany() /// /// Gets the collection of associated entity instances. /// - [Association("SelfReferencingComposition_OneToMany", "ID", "ParentID")] [Composition()] + [EntityAssociation("SelfReferencingComposition_OneToMany", new string[] { + "ID"}, new string[] { + "ParentID"})] public EntityCollection Children { get @@ -2016,7 +2037,9 @@ public int ID /// /// Gets or sets the associated entity. /// - [Association("SelfReferencingComposition_OneToMany", "ParentID", "ID", IsForeignKey=true)] + [EntityAssociation("SelfReferencingComposition_OneToMany", new string[] { + "ParentID"}, new string[] { + "ID"}, IsForeignKey=true)] public SelfReferencingComposition_OneToMany Parent { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/CompositionScenarios.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/CompositionScenarios.g.vb index 18a4e08b4..ace6976ad 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/CompositionScenarios.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/CompositionScenarios.g.vb @@ -1,7 +1,6 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.34209 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -89,8 +88,8 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Children() As EntityCollection(Of GrandChild) Get If (Me._children Is Nothing) Then @@ -146,7 +145,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Parent() As Parent Get If (Me._parent Is Nothing) Then @@ -366,7 +365,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Parent() As CompositionScenarios_Parent Get If (Me._parent Is Nothing) Then @@ -649,8 +648,8 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Children() As EntityCollection(Of CompositionScenarios_Child) Get If (Me._children Is Nothing) Then @@ -991,8 +990,8 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Child() As GreatGrandChild Get If (Me._child Is Nothing) Then @@ -1063,7 +1062,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Parent() As Child Get If (Me._parent Is Nothing) Then @@ -1285,7 +1284,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Parent() As GrandChild Get If (Me._parent Is Nothing) Then @@ -1454,8 +1453,8 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Children() As EntityCollection(Of Child) Get If (Me._children Is Nothing) Then @@ -1631,8 +1630,8 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Child() As SelfReferencingComposition Get If (Me._child Is Nothing) Then @@ -1683,7 +1682,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Parent() As SelfReferencingComposition Get If (Me._parent Is Nothing) Then @@ -1824,8 +1823,8 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Children() As EntityCollection(Of SelfReferencingComposition_OneToMany) Get If (Me._children Is Nothing) Then @@ -1861,7 +1860,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Parent() As SelfReferencingComposition_OneToMany Get If (Me._parent Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCFDbContextScenarios.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCFDbContextScenarios.g.cs index 6842db87a..ef2b76150 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCFDbContextScenarios.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCFDbContextScenarios.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -170,7 +169,9 @@ public byte[] Picture /// /// Gets the collection of associated entity instances. /// - [Association("Category_Product", "CategoryID", "CategoryID")] + [EntityAssociation("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"})] public EntityCollection Products { get @@ -501,7 +502,9 @@ public string Fax /// /// Gets the collection of associated entity instances. /// - [Association("Customer_Order", "CustomerID", "CustomerID")] + [EntityAssociation("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"})] public EntityCollection Orders { get @@ -713,7 +716,9 @@ public Order() /// /// Gets or sets the associated entity. /// - [Association("Customer_Order", "CustomerID", "CustomerID", IsForeignKey=true)] + [EntityAssociation("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"}, IsForeignKey=true)] public Customer Customer { get @@ -860,7 +865,9 @@ public Nullable Freight /// /// Gets the collection of associated entity instances. /// - [Association("Order_Order_Detail", "OrderID", "OrderID")] + [EntityAssociation("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"})] public EntityCollection Order_Details { get @@ -1275,7 +1282,9 @@ public float Discount /// /// Gets or sets the associated entity. /// - [Association("Order_Order_Detail", "OrderID", "OrderID", IsForeignKey=true)] + [EntityAssociation("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"}, IsForeignKey=true)] public Order Order { get @@ -1345,7 +1354,9 @@ public int OrderID /// /// Gets or sets the associated entity. /// - [Association("Product_Order_Detail", "ProductID", "ProductID", IsForeignKey=true)] + [EntityAssociation("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"}, IsForeignKey=true)] public Product Product { get @@ -1571,7 +1582,9 @@ public Product() /// /// Gets or sets the associated entity. /// - [Association("Category_Product", "CategoryID", "CategoryID", IsForeignKey=true)] + [EntityAssociation("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"}, IsForeignKey=true)] public Category Category { get @@ -1691,7 +1704,9 @@ public bool Discontinued /// /// Gets the collection of associated entity instances. /// - [Association("Product_Order_Detail", "ProductID", "ProductID")] + [EntityAssociation("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"})] public EntityCollection Order_Details { get @@ -2268,8 +2283,10 @@ public int RegionID /// /// Gets the collection of associated entity instances. /// - [Association("Region_Territory", "RegionID", "RegionID")] [Composition()] + [EntityAssociation("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"})] public EntityCollection Territories { get @@ -2350,7 +2367,9 @@ public Territory() /// /// Gets or sets the associated entity. /// - [Association("Region_Territory", "RegionID", "RegionID", IsForeignKey=true)] + [EntityAssociation("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"}, IsForeignKey=true)] public Region Region { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCFDbContextScenarios.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCFDbContextScenarios.g.vb index 92356d774..c503c92f4 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCFDbContextScenarios.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCFDbContextScenarios.g.vb @@ -1,7 +1,6 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.34209 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -170,7 +169,7 @@ Namespace CodeFirstModels ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Products() As EntityCollection(Of Product) Get If (Me._products Is Nothing) Then @@ -485,7 +484,7 @@ Namespace CodeFirstModels ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Orders() As EntityCollection(Of Order) Get If (Me._orders Is Nothing) Then @@ -709,7 +708,7 @@ Namespace CodeFirstModels ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Customer() As Customer Get If (Me._customer Is Nothing) Then @@ -830,7 +829,7 @@ Namespace CodeFirstModels ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Order_Details() As EntityCollection(Of Order_Detail) Get If (Me._order_Details Is Nothing) Then @@ -1202,7 +1201,7 @@ Namespace CodeFirstModels ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Order() As Order Get If (Me._order Is Nothing) Then @@ -1259,7 +1258,7 @@ Namespace CodeFirstModels ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Product() As Product Get If (Me._product Is Nothing) Then @@ -1492,7 +1491,7 @@ Namespace CodeFirstModels ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Category() As Category Get If (Me._category Is Nothing) Then @@ -1591,7 +1590,7 @@ Namespace CodeFirstModels ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Order_Details() As EntityCollection(Of Order_Detail) Get If (Me._order_Details Is Nothing) Then @@ -2107,8 +2106,8 @@ Namespace CodeFirstModels ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Territories() As EntityCollection(Of Territory) Get If (Me._territories Is Nothing) Then @@ -2189,7 +2188,7 @@ Namespace CodeFirstModels ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Region() As Region Get If (Me._region Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCoreContextScenarios.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCoreContextScenarios.g.cs index 1696448d3..07944688c 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCoreContextScenarios.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCoreContextScenarios.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -170,7 +169,9 @@ public byte[] Picture /// /// Gets the collection of associated entity instances. /// - [Association("Category_Product", "CategoryID", "CategoryID")] + [EntityAssociation("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"})] public EntityCollection Products { get @@ -502,7 +503,9 @@ public string Fax /// /// Gets the collection of associated entity instances. /// - [Association("Customer_Order", "CustomerID", "CustomerID")] + [EntityAssociation("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"})] public EntityCollection Orders { get @@ -714,7 +717,9 @@ public Order() /// /// Gets or sets the associated entity. /// - [Association("Customer_Order", "CustomerID", "CustomerID", IsForeignKey=true)] + [EntityAssociation("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"}, IsForeignKey=true)] public Customer Customer { get @@ -861,7 +866,9 @@ public Nullable Freight /// /// Gets the collection of associated entity instances. /// - [Association("Order_Order_Detail", "OrderID", "OrderID")] + [EntityAssociation("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"})] public EntityCollection Order_Details { get @@ -1276,7 +1283,9 @@ public float Discount /// /// Gets or sets the associated entity. /// - [Association("Order_Order_Detail", "OrderID", "OrderID", IsForeignKey=true)] + [EntityAssociation("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"}, IsForeignKey=true)] public Order Order { get @@ -1346,7 +1355,9 @@ public int OrderID /// /// Gets or sets the associated entity. /// - [Association("Product_Order_Detail", "ProductID", "ProductID", IsForeignKey=true)] + [EntityAssociation("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"}, IsForeignKey=true)] public Product Product { get @@ -1572,7 +1583,9 @@ public Product() /// /// Gets or sets the associated entity. /// - [Association("Category_Product", "CategoryID", "CategoryID", IsForeignKey=true)] + [EntityAssociation("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"}, IsForeignKey=true)] public Category Category { get @@ -1692,7 +1705,9 @@ public bool Discontinued /// /// Gets the collection of associated entity instances. /// - [Association("Product_Order_Detail", "ProductID", "ProductID")] + [EntityAssociation("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"})] public EntityCollection Order_Details { get @@ -2270,8 +2285,10 @@ public int RegionID /// /// Gets the collection of associated entity instances. /// - [Association("Region_Territory", "RegionID", "RegionID")] [Composition()] + [EntityAssociation("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"})] public EntityCollection Territories { get @@ -2352,7 +2369,9 @@ public Territory() /// /// Gets or sets the associated entity. /// - [Association("Region_Territory", "RegionID", "RegionID", IsForeignKey=true)] + [EntityAssociation("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"}, IsForeignKey=true)] public Region Region { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCoreContextScenarios.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCoreContextScenarios.g.vb index 5251ad2cb..13e048d77 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCoreContextScenarios.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCoreContextScenarios.g.vb @@ -1,7 +1,6 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -170,7 +169,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Products() As EntityCollection(Of Product) Get If (Me._products Is Nothing) Then @@ -486,7 +485,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Orders() As EntityCollection(Of Order) Get If (Me._orders Is Nothing) Then @@ -710,7 +709,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Customer() As Customer Get If (Me._customer Is Nothing) Then @@ -831,7 +830,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Order_Details() As EntityCollection(Of Order_Detail) Get If (Me._order_Details Is Nothing) Then @@ -1203,7 +1202,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Order() As Order Get If (Me._order Is Nothing) Then @@ -1260,7 +1259,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Product() As Product Get If (Me._product Is Nothing) Then @@ -1493,7 +1492,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Category() As Category Get If (Me._category Is Nothing) Then @@ -1592,7 +1591,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Order_Details() As EntityCollection(Of Order_Detail) Get If (Me._order_Details Is Nothing) Then @@ -2109,8 +2108,8 @@ Namespace EFCoreModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Territories() As EntityCollection(Of Territory) Get If (Me._territories Is Nothing) Then @@ -2191,7 +2190,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Region() As Region Get If (Me._region Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCore_ComplexObject.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCore_ComplexObject.g.cs index a307e33d8..3f586367e 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCore_ComplexObject.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCore_ComplexObject.g.cs @@ -315,8 +315,10 @@ public OwnedEntityWithBackNavigation OwnedEntityWithBackNavigation /// /// Gets or sets the associated entity. /// - [Association("FK_Employees_Employees_EmployeeId|owns:OwnedEntityWithExplicitId", "EmployeeId", "EmployeeId")] [Composition()] + [EntityAssociation("FK_Employees_Employees_EmployeeId|owns:OwnedEntityWithExplicitId", new string[] { + "EmployeeId"}, new string[] { + "EmployeeId"})] public OwnedEntityWithExplicitId OwnedEntityWithExplicitId { get @@ -342,9 +344,11 @@ public OwnedEntityWithExplicitId OwnedEntityWithExplicitId /// /// Gets or sets the associated entity. /// - [Association("FK_Employees_Employees_EmployeeId|owns:OwnedEntityWithExplicitIdAndBackNavigation" + - "", "EmployeeId", "EmployeeId")] [Composition()] + [EntityAssociation("FK_Employees_Employees_EmployeeId|owns:OwnedEntityWithExplicitIdAndBackNavigation" + + "", new string[] { + "EmployeeId"}, new string[] { + "EmployeeId"})] public OwnedEntityWithExplicitIdAndBackNavigation OwnedEntityWithExplicitIdAndBackNavigation { get @@ -602,7 +606,9 @@ public string Description /// /// Gets or sets the associated entity. /// - [Association("FK_Employees_Employees_EmployeeId", "EmployeeId", "EmployeeId", IsForeignKey=true)] + [EntityAssociation("FK_Employees_Employees_EmployeeId", new string[] { + "EmployeeId"}, new string[] { + "EmployeeId"}, IsForeignKey=true)] public Employee Employee { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCore_ComplexObject.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCore_ComplexObject.g.vb index 2c3626323..b2065daa5 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCore_ComplexObject.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFCore_ComplexObject.g.vb @@ -311,8 +311,8 @@ Namespace EFCoreModels.Scenarios.OwnedTypes ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property OwnedEntityWithExplicitId() As OwnedEntityWithExplicitId Get If (Me._ownedEntityWithExplicitId Is Nothing) Then @@ -333,9 +333,9 @@ Namespace EFCoreModels.Scenarios.OwnedTypes ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property OwnedEntityWithExplicitIdAndBackNavigation() As OwnedEntityWithExplicitIdAndBackNavigation Get If (Me._ownedEntityWithExplicitIdAndBackNavigation Is Nothing) Then @@ -582,7 +582,7 @@ Namespace EFCoreModels.Scenarios.OwnedTypes ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Employee() As Employee Get If (Me._employee Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFDbContextScenarios.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFDbContextScenarios.g.cs index 6f54b932c..dd55960e6 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFDbContextScenarios.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFDbContextScenarios.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -170,7 +169,9 @@ public byte[] Picture /// /// Gets the collection of associated entity instances. /// - [Association("Category_Product", "CategoryID", "CategoryID")] + [EntityAssociation("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"})] public EntityCollection Products { get @@ -502,7 +503,9 @@ public string Fax /// /// Gets the collection of associated entity instances. /// - [Association("Customer_Order", "CustomerID", "CustomerID")] + [EntityAssociation("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"})] public EntityCollection Orders { get @@ -714,7 +717,9 @@ public Order() /// /// Gets or sets the associated entity. /// - [Association("Customer_Order", "CustomerID", "CustomerID", IsForeignKey=true)] + [EntityAssociation("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"}, IsForeignKey=true)] public Customer Customer { get @@ -861,7 +866,9 @@ public Nullable Freight /// /// Gets the collection of associated entity instances. /// - [Association("Order_Order_Detail", "OrderID", "OrderID")] + [EntityAssociation("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"})] public EntityCollection Order_Details { get @@ -1276,7 +1283,9 @@ public float Discount /// /// Gets or sets the associated entity. /// - [Association("Order_Order_Detail", "OrderID", "OrderID", IsForeignKey=true)] + [EntityAssociation("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"}, IsForeignKey=true)] public Order Order { get @@ -1346,7 +1355,9 @@ public int OrderID /// /// Gets or sets the associated entity. /// - [Association("Product_Order_Detail", "ProductID", "ProductID", IsForeignKey=true)] + [EntityAssociation("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"}, IsForeignKey=true)] public Product Product { get @@ -1572,7 +1583,9 @@ public Product() /// /// Gets or sets the associated entity. /// - [Association("Category_Product", "CategoryID", "CategoryID", IsForeignKey=true)] + [EntityAssociation("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"}, IsForeignKey=true)] public Category Category { get @@ -1692,7 +1705,9 @@ public bool Discontinued /// /// Gets the collection of associated entity instances. /// - [Association("Product_Order_Detail", "ProductID", "ProductID")] + [EntityAssociation("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"})] public EntityCollection Order_Details { get @@ -2270,8 +2285,10 @@ public int RegionID /// /// Gets the collection of associated entity instances. /// - [Association("Region_Territory", "RegionID", "RegionID")] [Composition()] + [EntityAssociation("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"})] public EntityCollection Territories { get @@ -2352,7 +2369,9 @@ public Territory() /// /// Gets or sets the associated entity. /// - [Association("Region_Territory", "RegionID", "RegionID", IsForeignKey=true)] + [EntityAssociation("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"}, IsForeignKey=true)] public Region Region { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFDbContextScenarios.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFDbContextScenarios.g.vb index b9788dc4a..132d05418 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFDbContextScenarios.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/EFDbContextScenarios.g.vb @@ -1,7 +1,6 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.34209 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -170,7 +169,7 @@ Namespace DbContextModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Products() As EntityCollection(Of Product) Get If (Me._products Is Nothing) Then @@ -486,7 +485,7 @@ Namespace DbContextModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Orders() As EntityCollection(Of Order) Get If (Me._orders Is Nothing) Then @@ -710,7 +709,7 @@ Namespace DbContextModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Customer() As Customer Get If (Me._customer Is Nothing) Then @@ -831,7 +830,7 @@ Namespace DbContextModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Order_Details() As EntityCollection(Of Order_Detail) Get If (Me._order_Details Is Nothing) Then @@ -1203,7 +1202,7 @@ Namespace DbContextModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Order() As Order Get If (Me._order Is Nothing) Then @@ -1260,7 +1259,7 @@ Namespace DbContextModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Product() As Product Get If (Me._product Is Nothing) Then @@ -1493,7 +1492,7 @@ Namespace DbContextModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Category() As Category Get If (Me._category Is Nothing) Then @@ -1592,7 +1591,7 @@ Namespace DbContextModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Order_Details() As EntityCollection(Of Order_Detail) Get If (Me._order_Details Is Nothing) Then @@ -2109,8 +2108,8 @@ Namespace DbContextModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Territories() As EntityCollection(Of Territory) Get If (Me._territories Is Nothing) Then @@ -2191,7 +2190,7 @@ Namespace DbContextModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Region() As Region Get If (Me._region Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/InheritanceScenarios1.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/InheritanceScenarios1.g.cs index 1109cc33b..ec9d20307 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/InheritanceScenarios1.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/InheritanceScenarios1.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -175,7 +174,9 @@ public int InheritanceD_ID /// /// Gets or sets the associated entity. /// - [Association("InheritanceBase_InheritanceT1", "T1_ID", "ID", IsForeignKey=true)] + [EntityAssociation("InheritanceBase_InheritanceT1", new string[] { + "T1_ID"}, new string[] { + "ID"}, IsForeignKey=true)] public InheritanceT1 T1 { get @@ -234,7 +235,9 @@ public int T1_ID /// /// Gets the collection of associated entity instances. /// - [Association("InheritanceT1_InheritanceBase", "ID", "InheritanceBase_ID")] + [EntityAssociation("InheritanceT1_InheritanceBase", new string[] { + "ID"}, new string[] { + "InheritanceBase_ID"})] public EntityCollection T1s { get @@ -419,7 +422,9 @@ public int InheritanceD_ID /// /// Gets or sets the associated entity. /// - [Association("InheritanceBase_InheritanceT1", "T1_ID", "ID", IsForeignKey=true)] + [EntityAssociation("InheritanceBase_InheritanceT1", new string[] { + "T1_ID"}, new string[] { + "ID"}, IsForeignKey=true)] public InheritanceT1 T1 { get @@ -478,7 +483,9 @@ public int T1_ID /// /// Gets the collection of associated entity instances. /// - [Association("InheritanceT1_InheritanceBase", "ID", "InheritanceBase_ID")] + [EntityAssociation("InheritanceT1_InheritanceBase", new string[] { + "ID"}, new string[] { + "InheritanceBase_ID"})] public EntityCollection T1s { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/LTSNorthwindScenarios.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/LTSNorthwindScenarios.g.cs index ee3d96ab9..3ec831504 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/LTSNorthwindScenarios.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/LTSNorthwindScenarios.g.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -674,7 +674,9 @@ public Order_Bug479436() /// /// Gets or sets the associated entity. /// - [Association("Customer_Bug479436_Order_Bug479436", "CustomerID", "CustomerID", IsForeignKey=true)] + [EntityAssociation("Customer_Bug479436_Order_Bug479436", new string[] { + "CustomerID"}, new string[] { + "CustomerID"}, IsForeignKey=true)] public Customer_Bug479436 Customer { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/LTSNorthwindScenarios.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/LTSNorthwindScenarios.g.vb index c2e5c1b9e..30614056b 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/LTSNorthwindScenarios.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/LTSNorthwindScenarios.g.vb @@ -1,7 +1,7 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.34209 +' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -670,7 +670,7 @@ Namespace DataTests.Scenarios.LTS.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Customer() As Customer_Bug479436 Get If (Me._customer Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/MultipleProviderScenarios.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/MultipleProviderScenarios.g.cs index 40e5bdba7..d00973eae 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/MultipleProviderScenarios.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/MultipleProviderScenarios.g.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -173,7 +173,9 @@ public byte[] Picture /// /// Gets the collection of associated entity instances. /// - [Association("Category_Product", "CategoryID", "CategoryID")] + [EntityAssociation("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"})] public EntityCollection Products { get @@ -505,7 +507,9 @@ public string Fax /// /// Gets the collection of associated entity instances. /// - [Association("Customer_Order", "CustomerID", "CustomerID")] + [EntityAssociation("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"})] public EntityCollection Orders { get @@ -717,7 +721,9 @@ public Order() /// /// Gets or sets the associated entity. /// - [Association("Customer_Order", "CustomerID", "CustomerID", IsForeignKey=true)] + [EntityAssociation("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"}, IsForeignKey=true)] public Customer Customer { get @@ -865,7 +871,9 @@ public Nullable Freight /// /// Gets the collection of associated entity instances. /// - [Association("Order_Order_Detail", "OrderID", "OrderID")] + [EntityAssociation("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"})] public EntityCollection Order_Details { get @@ -1280,7 +1288,9 @@ public float Discount /// /// Gets or sets the associated entity. /// - [Association("Order_Order_Detail", "OrderID", "OrderID", IsForeignKey=true)] + [EntityAssociation("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"}, IsForeignKey=true)] public Order Order { get @@ -1350,7 +1360,9 @@ public int OrderID /// /// Gets or sets the associated entity. /// - [Association("Product_Order_Detail", "ProductID", "ProductID", IsForeignKey=true)] + [EntityAssociation("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"}, IsForeignKey=true)] public Product Product { get @@ -1576,7 +1588,9 @@ public Product() /// /// Gets or sets the associated entity. /// - [Association("Category_Product", "CategoryID", "CategoryID", IsForeignKey=true)] + [EntityAssociation("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"}, IsForeignKey=true)] public Category Category { get @@ -1696,7 +1710,9 @@ public bool Discontinued /// /// Gets the collection of associated entity instances. /// - [Association("Product_Order_Detail", "ProductID", "ProductID")] + [EntityAssociation("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"})] public EntityCollection Order_Details { get @@ -2278,8 +2294,10 @@ public int RegionID /// /// Gets the collection of associated entity instances. /// - [Association("Region_Territory", "RegionID", "RegionID")] [Composition()] + [EntityAssociation("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"})] public EntityCollection Territories { get @@ -2360,7 +2378,9 @@ public Territory() /// /// Gets or sets the associated entity. /// - [Association("Region_Territory", "RegionID", "RegionID", IsForeignKey=true)] + [EntityAssociation("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"}, IsForeignKey=true)] public Region Region { get @@ -2660,7 +2680,9 @@ public byte[] Picture /// /// Gets the collection of associated entity instances. /// - [Association("Category_Product", "CategoryID", "CategoryID")] + [EntityAssociation("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"})] public EntityCollection Products { get @@ -2992,7 +3014,9 @@ public string Fax /// /// Gets the collection of associated entity instances. /// - [Association("Customer_Order", "CustomerID", "CustomerID")] + [EntityAssociation("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"})] public EntityCollection Orders { get @@ -3204,7 +3228,9 @@ public Order() /// /// Gets or sets the associated entity. /// - [Association("Customer_Order", "CustomerID", "CustomerID", IsForeignKey=true)] + [EntityAssociation("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"}, IsForeignKey=true)] public Customer Customer { get @@ -3351,7 +3377,9 @@ public Nullable Freight /// /// Gets the collection of associated entity instances. /// - [Association("Order_Order_Detail", "OrderID", "OrderID")] + [EntityAssociation("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"})] public EntityCollection Order_Details { get @@ -3766,7 +3794,9 @@ public float Discount /// /// Gets or sets the associated entity. /// - [Association("Order_Order_Detail", "OrderID", "OrderID", IsForeignKey=true)] + [EntityAssociation("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"}, IsForeignKey=true)] public Order Order { get @@ -3836,7 +3866,9 @@ public int OrderID /// /// Gets or sets the associated entity. /// - [Association("Product_Order_Detail", "ProductID", "ProductID", IsForeignKey=true)] + [EntityAssociation("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"}, IsForeignKey=true)] public Product Product { get @@ -4062,7 +4094,9 @@ public Product() /// /// Gets or sets the associated entity. /// - [Association("Category_Product", "CategoryID", "CategoryID", IsForeignKey=true)] + [EntityAssociation("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"}, IsForeignKey=true)] public Category Category { get @@ -4182,7 +4216,9 @@ public bool Discontinued /// /// Gets the collection of associated entity instances. /// - [Association("Product_Order_Detail", "ProductID", "ProductID")] + [EntityAssociation("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"})] public EntityCollection Order_Details { get @@ -4760,8 +4796,10 @@ public int RegionID /// /// Gets the collection of associated entity instances. /// - [Association("Region_Territory", "RegionID", "RegionID")] [Composition()] + [EntityAssociation("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"})] public EntityCollection Territories { get @@ -4842,7 +4880,9 @@ public Territory() /// /// Gets or sets the associated entity. /// - [Association("Region_Territory", "RegionID", "RegionID", IsForeignKey=true)] + [EntityAssociation("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"}, IsForeignKey=true)] public Region Region { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/SharedEntities.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/SharedEntities.g.cs index 7996bbc17..7acaba9ec 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/SharedEntities.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/SharedEntities.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -75,7 +74,9 @@ public EntityA() /// /// Gets or sets the associated entity. /// - [Association("A_B", "IdB", "Id")] + [EntityAssociation("A_B", new string[] { + "IdB"}, new string[] { + "Id"})] public EntityB EntityB { get @@ -101,7 +102,9 @@ public EntityB EntityB /// /// Gets or sets the associated entity. /// - [Association("A_C", "IdC", "Id")] + [EntityAssociation("A_C", new string[] { + "IdC"}, new string[] { + "Id"})] public EntityC EntityC { get @@ -562,7 +565,9 @@ public EntityY() /// /// Gets or sets the associated entity. /// - [Association("Y_Z", "IdZ", "Id")] + [EntityAssociation("Y_Z", new string[] { + "IdZ"}, new string[] { + "Id"})] public EntityZ EntityZ { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/SharedEntities.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/SharedEntities.g.vb index 8f511a3ba..e189c4834 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/SharedEntities.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/SharedEntities.g.vb @@ -1,7 +1,6 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.34209 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -90,7 +89,7 @@ Namespace SharedEntities ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property EntityB() As EntityB Get If (Me._entityB Is Nothing) Then @@ -111,7 +110,7 @@ Namespace SharedEntities ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property EntityC() As EntityC Get If (Me._entityC Is Nothing) Then @@ -544,7 +543,7 @@ Namespace SharedEntities ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property EntityZ() As EntityZ Get If (Me._entityZ Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/TestProvider_Scenarios.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/TestProvider_Scenarios.g.cs index ba7158419..2bea78fb2 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/TestProvider_Scenarios.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/TestProvider_Scenarios.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -92,7 +91,11 @@ public A() /// /// Gets or sets the associated entity. /// - [Association("A_B", "BID1, BID2", "ID1, ID2", IsForeignKey=true)] + [EntityAssociation("A_B", new string[] { + "BID1", + "BID2"}, new string[] { + "ID1", + "ID2"}, IsForeignKey=true)] public B B { get @@ -366,8 +369,12 @@ public B() /// /// Gets the collection of associated entity instances. /// - [Association("B_C", "ID1, ID2", "BID1, BID2")] [Display(Description="Cs")] + [EntityAssociation("B_C", new string[] { + "ID1", + "ID2"}, new string[] { + "BID1", + "BID2"})] public EntityCollection Cs { get @@ -549,8 +556,10 @@ public int BID2 /// /// Gets or sets the associated entity. /// - [Association("C_D_Ref1", "DID_Ref1", "ID", IsForeignKey=true)] [Display(Description="D_Ref1")] + [EntityAssociation("C_D_Ref1", new string[] { + "DID_Ref1"}, new string[] { + "ID"}, IsForeignKey=true)] public D D_Ref1 { get @@ -593,7 +602,9 @@ public D D_Ref1 /// /// Gets or sets the associated entity. /// - [Association("C_D_Ref2", "DID_Ref2", "ID", IsForeignKey=true)] + [EntityAssociation("C_D_Ref2", new string[] { + "DID_Ref2"}, new string[] { + "ID"}, IsForeignKey=true)] public D D_Ref2 { get @@ -781,8 +792,10 @@ public int CartId /// /// Gets the collection of associated entity instances. /// - [Association("CartItem_Cart", "CartId", "CartItemId")] [Editable(false)] + [EntityAssociation("CartItem_Cart", new string[] { + "CartId"}, new string[] { + "CartItemId"})] [ReadOnly(true)] public EntityCollection Items { @@ -864,7 +877,9 @@ public CartItem() /// /// Gets or sets the associated entity. /// - [Association("CartItem_Cart", "CartItemId", "CartId", IsForeignKey=true)] + [EntityAssociation("CartItem_Cart", new string[] { + "CartItemId"}, new string[] { + "CartId"}, IsForeignKey=true)] public Cart Cart { get @@ -1209,7 +1224,9 @@ public byte[] BinaryData /// /// Gets or sets the associated entity. /// - [Association("C_D_Ref1", "ID", "DID_Ref1")] + [EntityAssociation("C_D_Ref1", new string[] { + "ID"}, new string[] { + "DID_Ref1"})] public C C { get @@ -1244,7 +1261,9 @@ public C C /// /// Gets or sets the associated entity. /// - [Association("D_D", "DSelfRef_ID1", "ID", IsForeignKey=true)] + [EntityAssociation("D_D", new string[] { + "DSelfRef_ID1"}, new string[] { + "ID"}, IsForeignKey=true)] public D D1 { get @@ -1287,7 +1306,9 @@ public D D1 /// /// Gets or sets the associated entity. /// - [Association("D_D2", "DSelfRef_ID2", "ID", IsForeignKey=true)] + [EntityAssociation("D_D2", new string[] { + "DSelfRef_ID2"}, new string[] { + "ID"}, IsForeignKey=true)] public D D2 { get @@ -1330,7 +1351,9 @@ public D D2 /// /// Gets or sets the associated entity. /// - [Association("D_D2", "ID", "DSelfRef_ID2")] + [EntityAssociation("D_D2", new string[] { + "ID"}, new string[] { + "DSelfRef_ID2"})] public D D2_BackRef { get @@ -1365,7 +1388,9 @@ public D D2_BackRef /// /// Gets the collection of associated entity instances. /// - [Association("D_D", "ID", "DSelfRef_ID1")] + [EntityAssociation("D_D", new string[] { + "ID"}, new string[] { + "DSelfRef_ID1"})] public EntityCollection Ds { get @@ -5492,7 +5517,9 @@ public int ID /// /// Gets or sets the associated entity. /// - [Association("Parent_Child", "ParentID", "ID", IsForeignKey=true)] + [EntityAssociation("Parent_Child", new string[] { + "ParentID"}, new string[] { + "ID"}, IsForeignKey=true)] public NullableFKParent Parent { get @@ -5535,7 +5562,9 @@ public NullableFKParent Parent /// /// Gets or sets the associated entity. /// - [Association("Parent_Child_Singleton", "ParentID_Singleton", "ID", IsForeignKey=true)] + [EntityAssociation("Parent_Child_Singleton", new string[] { + "ParentID_Singleton"}, new string[] { + "ID"}, IsForeignKey=true)] public NullableFKParent Parent2 { get @@ -5686,7 +5715,9 @@ public NullableFKParent() /// /// Gets or sets the associated entity. /// - [Association("Parent_Child_Singleton", "ID", "ParentID_Singleton")] + [EntityAssociation("Parent_Child_Singleton", new string[] { + "ID"}, new string[] { + "ParentID_Singleton"})] public NullableFKChild Child { get @@ -5721,7 +5752,9 @@ public NullableFKChild Child /// /// Gets the collection of associated entity instances. /// - [Association("Parent_Child", "ID", "ParentID")] + [EntityAssociation("Parent_Child", new string[] { + "ID"}, new string[] { + "ParentID"})] public EntityCollection Children { get @@ -6187,7 +6220,9 @@ public RoundtripOriginal_TestEntity2() /// /// Gets or sets the associated entity. /// - [Association("RTO_RTO2", "ID", "ID")] + [EntityAssociation("RTO_RTO2", new string[] { + "ID"}, new string[] { + "ID"})] public RoundtripOriginal_TestEntity AssocProp { get @@ -6572,7 +6607,9 @@ public TestCycles() /// /// Gets or sets the associated entity. /// - [Association("TestCycle_Parent", "ParentName", "Name", IsForeignKey=true)] + [EntityAssociation("TestCycle_Parent", new string[] { + "ParentName"}, new string[] { + "Name"}, IsForeignKey=true)] public TestCycles IncludedT { get @@ -6615,7 +6652,9 @@ public TestCycles IncludedT /// /// Gets the collection of associated entity instances. /// - [Association("TestCycle_Parent", "Name", "ParentName")] + [EntityAssociation("TestCycle_Parent", new string[] { + "Name"}, new string[] { + "ParentName"})] public EntityCollection IncludedTs { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/TestProvider_Scenarios.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/TestProvider_Scenarios.g.vb index 4bd4e16fe..2fd2bcdb0 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/TestProvider_Scenarios.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/TestProvider_Scenarios.g.vb @@ -1,7 +1,6 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -112,7 +111,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property B() As B Get If (Me._b Is Nothing) Then @@ -355,8 +354,8 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Cs() As EntityCollection(Of C) Get If (Me._cs Is Nothing) Then @@ -531,8 +530,8 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property D_Ref1() As D Get If (Me._d_Ref1 Is Nothing) Then @@ -565,7 +564,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property D_Ref2() As D Get If (Me._d_Ref2 Is Nothing) Then @@ -733,8 +732,8 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ Public ReadOnly Property Items() As EntityCollection(Of CartItem) Get @@ -816,7 +815,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Cart() As Cart Get If (Me._cart Is Nothing) Then @@ -1141,7 +1140,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property C() As C Get If (Me._c Is Nothing) Then @@ -1169,7 +1168,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property D1() As D Get If (Me._d1 Is Nothing) Then @@ -1202,7 +1201,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property D2() As D Get If (Me._d2 Is Nothing) Then @@ -1235,7 +1234,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property D2_BackRef() As D Get If (Me._d2_BackRef Is Nothing) Then @@ -1263,7 +1262,7 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Ds() As EntityCollection(Of D) Get If (Me._ds Is Nothing) Then @@ -5178,7 +5177,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Parent() As NullableFKParent Get If (Me._parent Is Nothing) Then @@ -5211,7 +5210,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Parent2() As NullableFKParent Get If (Me._parent2 Is Nothing) Then @@ -5346,7 +5345,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Child() As NullableFKChild Get If (Me._child Is Nothing) Then @@ -5374,7 +5373,7 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Children() As EntityCollection(Of NullableFKChild) Get If (Me._children Is Nothing) Then @@ -5818,7 +5817,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property AssocProp() As RoundtripOriginal_TestEntity Get If (Me._assocProp Is Nothing) Then @@ -6183,7 +6182,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property IncludedT() As TestCycles Get If (Me._includedT Is Nothing) Then @@ -6216,7 +6215,7 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property IncludedTs() As EntityCollection(Of TestCycles) Get If (Me._includedTs Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/TestProvider_Scenarios_CodeGen.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/TestProvider_Scenarios_CodeGen.g.cs index e819aea19..a8ec01014 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/TestProvider_Scenarios_CodeGen.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/TestProvider_Scenarios_CodeGen.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -90,7 +89,11 @@ public A() /// /// Gets or sets the associated entity. /// - [Association("A_B", "BID1, BID2", "ID1, ID2", IsForeignKey=true)] + [EntityAssociation("A_B", new string[] { + "BID1", + "BID2"}, new string[] { + "ID1", + "ID2"}, IsForeignKey=true)] public B B { get @@ -364,8 +367,12 @@ public B() /// /// Gets the collection of associated entity instances. /// - [Association("B_C", "ID1, ID2", "BID1, BID2")] [Display(Description="Cs")] + [EntityAssociation("B_C", new string[] { + "ID1", + "ID2"}, new string[] { + "BID1", + "BID2"})] public EntityCollection Cs { get @@ -547,8 +554,10 @@ public int BID2 /// /// Gets or sets the associated entity. /// - [Association("C_D_Ref1", "DID_Ref1", "ID", IsForeignKey=true)] [Display(Description="D_Ref1")] + [EntityAssociation("C_D_Ref1", new string[] { + "DID_Ref1"}, new string[] { + "ID"}, IsForeignKey=true)] public D D_Ref1 { get @@ -591,7 +600,9 @@ public D D_Ref1 /// /// Gets or sets the associated entity. /// - [Association("C_D_Ref2", "DID_Ref2", "ID", IsForeignKey=true)] + [EntityAssociation("C_D_Ref2", new string[] { + "DID_Ref2"}, new string[] { + "ID"}, IsForeignKey=true)] public D D_Ref2 { get @@ -805,7 +816,9 @@ public byte[] BinaryData /// /// Gets or sets the associated entity. /// - [Association("C_D_Ref1", "ID", "DID_Ref1")] + [EntityAssociation("C_D_Ref1", new string[] { + "ID"}, new string[] { + "DID_Ref1"})] public C C { get @@ -840,7 +853,9 @@ public C C /// /// Gets or sets the associated entity. /// - [Association("D_D", "DSelfRef_ID1", "ID", IsForeignKey=true)] + [EntityAssociation("D_D", new string[] { + "DSelfRef_ID1"}, new string[] { + "ID"}, IsForeignKey=true)] public D D1 { get @@ -883,7 +898,9 @@ public D D1 /// /// Gets or sets the associated entity. /// - [Association("D_D2", "DSelfRef_ID2", "ID", IsForeignKey=true)] + [EntityAssociation("D_D2", new string[] { + "DSelfRef_ID2"}, new string[] { + "ID"}, IsForeignKey=true)] public D D2 { get @@ -926,7 +943,9 @@ public D D2 /// /// Gets or sets the associated entity. /// - [Association("D_D2", "ID", "DSelfRef_ID2")] + [EntityAssociation("D_D2", new string[] { + "ID"}, new string[] { + "DSelfRef_ID2"})] public D D2_BackRef { get @@ -961,7 +980,9 @@ public D D2_BackRef /// /// Gets the collection of associated entity instances. /// - [Association("D_D", "ID", "DSelfRef_ID1")] + [EntityAssociation("D_D", new string[] { + "ID"}, new string[] { + "DSelfRef_ID1"})] public EntityCollection Ds { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/TestProvider_Scenarios_CodeGen.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/TestProvider_Scenarios_CodeGen.g.vb index 86f875f8c..5e42bb906 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/TestProvider_Scenarios_CodeGen.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/Default/Scenarios/TestProvider_Scenarios_CodeGen.g.vb @@ -1,7 +1,6 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -109,7 +108,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property B() As B Get If (Me._b Is Nothing) Then @@ -352,8 +351,8 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Cs() As EntityCollection(Of C) Get If (Me._cs Is Nothing) Then @@ -528,8 +527,8 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property D_Ref1() As D Get If (Me._d_Ref1 Is Nothing) Then @@ -562,7 +561,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property D_Ref2() As D Get If (Me._d_Ref2 Is Nothing) Then @@ -765,7 +764,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property C() As C Get If (Me._c Is Nothing) Then @@ -793,7 +792,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property D1() As D Get If (Me._d1 Is Nothing) Then @@ -826,7 +825,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property D2() As D Get If (Me._d2 Is Nothing) Then @@ -859,7 +858,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property D2_BackRef() As D Get If (Me._d2_BackRef Is Nothing) Then @@ -887,7 +886,7 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Ds() As EntityCollection(Of D) Get If (Me._ds Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFCFDbContextScenarios.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFCFDbContextScenarios.g.cs index 0a2c07a71..7a2392fac 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFCFDbContextScenarios.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFCFDbContextScenarios.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -160,7 +159,9 @@ public byte[] Picture /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Category_Product", "CategoryID", "CategoryID")] + [global::OpenRiaServices.EntityAssociationAttribute("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"})] public global::OpenRiaServices.Client.EntityCollection Products { get @@ -491,7 +492,9 @@ public string Fax /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Customer_Order", "CustomerID", "CustomerID")] + [global::OpenRiaServices.EntityAssociationAttribute("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"})] public global::OpenRiaServices.Client.EntityCollection Orders { get @@ -703,7 +706,9 @@ public Order() /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Customer_Order", "CustomerID", "CustomerID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"}, IsForeignKey=true)] public global::CodeFirstModels.Customer Customer { get @@ -850,7 +855,9 @@ public string FormattedName /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Order_Order_Detail", "OrderID", "OrderID")] + [global::OpenRiaServices.EntityAssociationAttribute("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"})] public global::OpenRiaServices.Client.EntityCollection Order_Details { get @@ -1265,7 +1272,9 @@ public float Discount /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Order_Order_Detail", "OrderID", "OrderID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"}, IsForeignKey=true)] public global::CodeFirstModels.Order Order { get @@ -1335,7 +1344,9 @@ public int OrderID /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Product_Order_Detail", "ProductID", "ProductID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"}, IsForeignKey=true)] public global::CodeFirstModels.Product Product { get @@ -1561,7 +1572,9 @@ public Product() /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Category_Product", "CategoryID", "CategoryID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"}, IsForeignKey=true)] public global::CodeFirstModels.Category Category { get @@ -1681,7 +1694,9 @@ public bool Discontinued /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Product_Order_Detail", "ProductID", "ProductID")] + [global::OpenRiaServices.EntityAssociationAttribute("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"})] public global::OpenRiaServices.Client.EntityCollection Order_Details { get @@ -2258,7 +2273,9 @@ public int RegionID /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Region_Territory", "RegionID", "RegionID")] + [global::OpenRiaServices.EntityAssociationAttribute("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"})] [global::System.ComponentModel.DataAnnotations.CompositionAttribute()] public global::OpenRiaServices.Client.EntityCollection Territories { @@ -2340,7 +2357,9 @@ public Territory() /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Region_Territory", "RegionID", "RegionID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"}, IsForeignKey=true)] public global::CodeFirstModels.Region Region { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFCFDbContextScenarios.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFCFDbContextScenarios.g.vb index 3aee7f5ce..8a86ddb39 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFCFDbContextScenarios.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFCFDbContextScenarios.g.vb @@ -1,7 +1,6 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.34209 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -158,7 +157,7 @@ Namespace CodeFirstModels ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Products() As Global.OpenRiaServices.Client.EntityCollection(Of Global.CodeFirstModels.Product) Get If (Me._products Is Nothing) Then @@ -473,7 +472,7 @@ Namespace CodeFirstModels ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Orders() As Global.OpenRiaServices.Client.EntityCollection(Of Global.CodeFirstModels.Order) Get If (Me._orders Is Nothing) Then @@ -697,7 +696,7 @@ Namespace CodeFirstModels ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Customer() As Global.CodeFirstModels.Customer Get If (Me._customer Is Nothing) Then @@ -818,7 +817,7 @@ Namespace CodeFirstModels ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Order_Details() As Global.OpenRiaServices.Client.EntityCollection(Of Global.CodeFirstModels.Order_Detail) Get If (Me._order_Details Is Nothing) Then @@ -1190,7 +1189,7 @@ Namespace CodeFirstModels ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Order() As Global.CodeFirstModels.Order Get If (Me._order Is Nothing) Then @@ -1247,7 +1246,7 @@ Namespace CodeFirstModels ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Product() As Global.CodeFirstModels.Product Get If (Me._product Is Nothing) Then @@ -1480,7 +1479,7 @@ Namespace CodeFirstModels ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Category() As Global.CodeFirstModels.Category Get If (Me._category Is Nothing) Then @@ -1579,7 +1578,7 @@ Namespace CodeFirstModels ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Order_Details() As Global.OpenRiaServices.Client.EntityCollection(Of Global.CodeFirstModels.Order_Detail) Get If (Me._order_Details Is Nothing) Then @@ -2095,7 +2094,7 @@ Namespace CodeFirstModels ''' ''' Gets the collection of associated entity instances. ''' - _ Public ReadOnly Property Territories() As Global.OpenRiaServices.Client.EntityCollection(Of Global.CodeFirstModels.Territory) Get @@ -2177,7 +2176,7 @@ Namespace CodeFirstModels ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Region() As Global.CodeFirstModels.Region Get If (Me._region Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFCoreDbContextScenarios.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFCoreDbContextScenarios.g.cs index 9221ebf88..aa3715d7e 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFCoreDbContextScenarios.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFCoreDbContextScenarios.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -160,7 +159,9 @@ public byte[] Picture /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Category_Product", "CategoryID", "CategoryID")] + [global::OpenRiaServices.EntityAssociationAttribute("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"})] public global::OpenRiaServices.Client.EntityCollection Products { get @@ -492,7 +493,9 @@ public string Fax /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Customer_Order", "CustomerID", "CustomerID")] + [global::OpenRiaServices.EntityAssociationAttribute("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"})] public global::OpenRiaServices.Client.EntityCollection Orders { get @@ -704,7 +707,9 @@ public Order() /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Customer_Order", "CustomerID", "CustomerID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"}, IsForeignKey=true)] public global::EFCoreModels.Northwind.Customer Customer { get @@ -851,7 +856,9 @@ public string FormattedName /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Order_Order_Detail", "OrderID", "OrderID")] + [global::OpenRiaServices.EntityAssociationAttribute("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"})] public global::OpenRiaServices.Client.EntityCollection Order_Details { get @@ -1266,7 +1273,9 @@ public float Discount /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Order_Order_Detail", "OrderID", "OrderID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"}, IsForeignKey=true)] public global::EFCoreModels.Northwind.Order Order { get @@ -1336,7 +1345,9 @@ public int OrderID /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Product_Order_Detail", "ProductID", "ProductID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"}, IsForeignKey=true)] public global::EFCoreModels.Northwind.Product Product { get @@ -1562,7 +1573,9 @@ public Product() /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Category_Product", "CategoryID", "CategoryID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"}, IsForeignKey=true)] public global::EFCoreModels.Northwind.Category Category { get @@ -1682,7 +1695,9 @@ public bool Discontinued /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Product_Order_Detail", "ProductID", "ProductID")] + [global::OpenRiaServices.EntityAssociationAttribute("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"})] public global::OpenRiaServices.Client.EntityCollection Order_Details { get @@ -2260,7 +2275,9 @@ public int RegionID /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Region_Territory", "RegionID", "RegionID")] + [global::OpenRiaServices.EntityAssociationAttribute("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"})] [global::System.ComponentModel.DataAnnotations.CompositionAttribute()] public global::OpenRiaServices.Client.EntityCollection Territories { @@ -2342,7 +2359,9 @@ public Territory() /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Region_Territory", "RegionID", "RegionID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"}, IsForeignKey=true)] public global::EFCoreModels.Northwind.Region Region { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFCoreDbContextScenarios.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFCoreDbContextScenarios.g.vb index b82a1a9fb..c0f0a25c8 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFCoreDbContextScenarios.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFCoreDbContextScenarios.g.vb @@ -1,7 +1,6 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -158,7 +157,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Products() As Global.OpenRiaServices.Client.EntityCollection(Of Global.EFCoreModels.Northwind.Product) Get If (Me._products Is Nothing) Then @@ -474,7 +473,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Orders() As Global.OpenRiaServices.Client.EntityCollection(Of Global.EFCoreModels.Northwind.Order) Get If (Me._orders Is Nothing) Then @@ -698,7 +697,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Customer() As Global.EFCoreModels.Northwind.Customer Get If (Me._customer Is Nothing) Then @@ -819,7 +818,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Order_Details() As Global.OpenRiaServices.Client.EntityCollection(Of Global.EFCoreModels.Northwind.Order_Detail) Get If (Me._order_Details Is Nothing) Then @@ -1191,7 +1190,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Order() As Global.EFCoreModels.Northwind.Order Get If (Me._order Is Nothing) Then @@ -1248,7 +1247,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Product() As Global.EFCoreModels.Northwind.Product Get If (Me._product Is Nothing) Then @@ -1481,7 +1480,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Category() As Global.EFCoreModels.Northwind.Category Get If (Me._category Is Nothing) Then @@ -1580,7 +1579,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Order_Details() As Global.OpenRiaServices.Client.EntityCollection(Of Global.EFCoreModels.Northwind.Order_Detail) Get If (Me._order_Details Is Nothing) Then @@ -2097,7 +2096,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ Public ReadOnly Property Territories() As Global.OpenRiaServices.Client.EntityCollection(Of Global.EFCoreModels.Northwind.Territory) Get @@ -2179,7 +2178,7 @@ Namespace EFCoreModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Region() As Global.EFCoreModels.Northwind.Region Get If (Me._region Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFDbContextScenarios.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFDbContextScenarios.g.cs index 461097a67..a962d911d 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFDbContextScenarios.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFDbContextScenarios.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -160,7 +159,9 @@ public byte[] Picture /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Category_Product", "CategoryID", "CategoryID")] + [global::OpenRiaServices.EntityAssociationAttribute("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"})] public global::OpenRiaServices.Client.EntityCollection Products { get @@ -492,7 +493,9 @@ public string Fax /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Customer_Order", "CustomerID", "CustomerID")] + [global::OpenRiaServices.EntityAssociationAttribute("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"})] public global::OpenRiaServices.Client.EntityCollection Orders { get @@ -704,7 +707,9 @@ public Order() /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Customer_Order", "CustomerID", "CustomerID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"}, IsForeignKey=true)] public global::DbContextModels.Northwind.Customer Customer { get @@ -851,7 +856,9 @@ public string FormattedName /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Order_Order_Detail", "OrderID", "OrderID")] + [global::OpenRiaServices.EntityAssociationAttribute("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"})] public global::OpenRiaServices.Client.EntityCollection Order_Details { get @@ -1266,7 +1273,9 @@ public float Discount /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Order_Order_Detail", "OrderID", "OrderID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"}, IsForeignKey=true)] public global::DbContextModels.Northwind.Order Order { get @@ -1336,7 +1345,9 @@ public int OrderID /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Product_Order_Detail", "ProductID", "ProductID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"}, IsForeignKey=true)] public global::DbContextModels.Northwind.Product Product { get @@ -1562,7 +1573,9 @@ public Product() /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Category_Product", "CategoryID", "CategoryID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"}, IsForeignKey=true)] public global::DbContextModels.Northwind.Category Category { get @@ -1682,7 +1695,9 @@ public bool Discontinued /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Product_Order_Detail", "ProductID", "ProductID")] + [global::OpenRiaServices.EntityAssociationAttribute("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"})] public global::OpenRiaServices.Client.EntityCollection Order_Details { get @@ -2260,7 +2275,9 @@ public int RegionID /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Region_Territory", "RegionID", "RegionID")] + [global::OpenRiaServices.EntityAssociationAttribute("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"})] [global::System.ComponentModel.DataAnnotations.CompositionAttribute()] public global::OpenRiaServices.Client.EntityCollection Territories { @@ -2342,7 +2359,9 @@ public Territory() /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Region_Territory", "RegionID", "RegionID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"}, IsForeignKey=true)] public global::DbContextModels.Northwind.Region Region { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFDbContextScenarios.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFDbContextScenarios.g.vb index b078bce73..a92812ae8 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFDbContextScenarios.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/EFDbContextScenarios.g.vb @@ -1,7 +1,6 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.34209 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -158,7 +157,7 @@ Namespace DbContextModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Products() As Global.OpenRiaServices.Client.EntityCollection(Of Global.DbContextModels.Northwind.Product) Get If (Me._products Is Nothing) Then @@ -474,7 +473,7 @@ Namespace DbContextModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Orders() As Global.OpenRiaServices.Client.EntityCollection(Of Global.DbContextModels.Northwind.Order) Get If (Me._orders Is Nothing) Then @@ -698,7 +697,7 @@ Namespace DbContextModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Customer() As Global.DbContextModels.Northwind.Customer Get If (Me._customer Is Nothing) Then @@ -819,7 +818,7 @@ Namespace DbContextModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Order_Details() As Global.OpenRiaServices.Client.EntityCollection(Of Global.DbContextModels.Northwind.Order_Detail) Get If (Me._order_Details Is Nothing) Then @@ -1191,7 +1190,7 @@ Namespace DbContextModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Order() As Global.DbContextModels.Northwind.Order Get If (Me._order Is Nothing) Then @@ -1248,7 +1247,7 @@ Namespace DbContextModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Product() As Global.DbContextModels.Northwind.Product Get If (Me._product Is Nothing) Then @@ -1481,7 +1480,7 @@ Namespace DbContextModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Category() As Global.DbContextModels.Northwind.Category Get If (Me._category Is Nothing) Then @@ -1580,7 +1579,7 @@ Namespace DbContextModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Order_Details() As Global.OpenRiaServices.Client.EntityCollection(Of Global.DbContextModels.Northwind.Order_Detail) Get If (Me._order_Details Is Nothing) Then @@ -2097,7 +2096,7 @@ Namespace DbContextModels.Northwind ''' ''' Gets the collection of associated entity instances. ''' - _ Public ReadOnly Property Territories() As Global.OpenRiaServices.Client.EntityCollection(Of Global.DbContextModels.Northwind.Territory) Get @@ -2179,7 +2178,7 @@ Namespace DbContextModels.Northwind ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Region() As Global.DbContextModels.Northwind.Region Get If (Me._region Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/InheritanceScenarios1.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/InheritanceScenarios1.g.cs index 63fa0204b..e0fc273c0 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/InheritanceScenarios1.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/InheritanceScenarios1.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -164,7 +163,9 @@ public int InheritanceD_ID /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("InheritanceBase_InheritanceT1", "T1_ID", "ID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("InheritanceBase_InheritanceT1", new string[] { + "T1_ID"}, new string[] { + "ID"}, IsForeignKey=true)] public global::TestDomainServices.InheritanceT1 T1 { get @@ -223,7 +224,9 @@ public int T1_ID /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("InheritanceT1_InheritanceBase", "ID", "InheritanceBase_ID")] + [global::OpenRiaServices.EntityAssociationAttribute("InheritanceT1_InheritanceBase", new string[] { + "ID"}, new string[] { + "InheritanceBase_ID"})] public global::OpenRiaServices.Client.EntityCollection T1s { get @@ -408,7 +411,9 @@ public int InheritanceD_ID /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("InheritanceBase_InheritanceT1", "T1_ID", "ID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("InheritanceBase_InheritanceT1", new string[] { + "T1_ID"}, new string[] { + "ID"}, IsForeignKey=true)] public global::TestDomainServices.InheritanceT1 T1 { get @@ -467,7 +472,9 @@ public int T1_ID /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("InheritanceT1_InheritanceBase", "ID", "InheritanceBase_ID")] + [global::OpenRiaServices.EntityAssociationAttribute("InheritanceT1_InheritanceBase", new string[] { + "ID"}, new string[] { + "InheritanceBase_ID"})] public global::OpenRiaServices.Client.EntityCollection T1s { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/MultipleProviderScenarios.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/MultipleProviderScenarios.g.cs index 421852c23..bbe714fbe 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/MultipleProviderScenarios.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/MultipleProviderScenarios.g.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -163,7 +163,9 @@ public byte[] Picture /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Category_Product", "CategoryID", "CategoryID")] + [global::OpenRiaServices.EntityAssociationAttribute("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"})] public global::OpenRiaServices.Client.EntityCollection Products { get @@ -495,7 +497,9 @@ public string Fax /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Customer_Order", "CustomerID", "CustomerID")] + [global::OpenRiaServices.EntityAssociationAttribute("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"})] public global::OpenRiaServices.Client.EntityCollection Orders { get @@ -707,7 +711,9 @@ public Order() /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Customer_Order", "CustomerID", "CustomerID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"}, IsForeignKey=true)] public global::DataTests.Northwind.LTS.Customer Customer { get @@ -855,7 +861,9 @@ public string FormattedName /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Order_Order_Detail", "OrderID", "OrderID")] + [global::OpenRiaServices.EntityAssociationAttribute("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"})] public global::OpenRiaServices.Client.EntityCollection Order_Details { get @@ -1270,7 +1278,9 @@ public float Discount /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Order_Order_Detail", "OrderID", "OrderID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"}, IsForeignKey=true)] public global::DataTests.Northwind.LTS.Order Order { get @@ -1340,7 +1350,9 @@ public int OrderID /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Product_Order_Detail", "ProductID", "ProductID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"}, IsForeignKey=true)] public global::DataTests.Northwind.LTS.Product Product { get @@ -1566,7 +1578,9 @@ public Product() /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Category_Product", "CategoryID", "CategoryID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"}, IsForeignKey=true)] public global::DataTests.Northwind.LTS.Category Category { get @@ -1686,7 +1700,9 @@ public bool Discontinued /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Product_Order_Detail", "ProductID", "ProductID")] + [global::OpenRiaServices.EntityAssociationAttribute("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"})] public global::OpenRiaServices.Client.EntityCollection Order_Details { get @@ -2268,7 +2284,9 @@ public int RegionID /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Region_Territory", "RegionID", "RegionID")] + [global::OpenRiaServices.EntityAssociationAttribute("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"})] [global::System.ComponentModel.DataAnnotations.CompositionAttribute()] public global::OpenRiaServices.Client.EntityCollection Territories { @@ -2350,7 +2368,9 @@ public Territory() /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Region_Territory", "RegionID", "RegionID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"}, IsForeignKey=true)] public global::DataTests.Northwind.LTS.Region Region { get @@ -2640,7 +2660,9 @@ public byte[] Picture /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Category_Product", "CategoryID", "CategoryID")] + [global::OpenRiaServices.EntityAssociationAttribute("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"})] public global::OpenRiaServices.Client.EntityCollection Products { get @@ -2972,7 +2994,9 @@ public string Fax /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Customer_Order", "CustomerID", "CustomerID")] + [global::OpenRiaServices.EntityAssociationAttribute("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"})] public global::OpenRiaServices.Client.EntityCollection Orders { get @@ -3184,7 +3208,9 @@ public Order() /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Customer_Order", "CustomerID", "CustomerID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Customer_Order", new string[] { + "CustomerID"}, new string[] { + "CustomerID"}, IsForeignKey=true)] public global::NorthwindModel.Customer Customer { get @@ -3331,7 +3357,9 @@ public string FormattedName /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Order_Order_Detail", "OrderID", "OrderID")] + [global::OpenRiaServices.EntityAssociationAttribute("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"})] public global::OpenRiaServices.Client.EntityCollection Order_Details { get @@ -3746,7 +3774,9 @@ public float Discount /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Order_Order_Detail", "OrderID", "OrderID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Order_Order_Detail", new string[] { + "OrderID"}, new string[] { + "OrderID"}, IsForeignKey=true)] public global::NorthwindModel.Order Order { get @@ -3816,7 +3846,9 @@ public int OrderID /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Product_Order_Detail", "ProductID", "ProductID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"}, IsForeignKey=true)] public global::NorthwindModel.Product Product { get @@ -4042,7 +4074,9 @@ public Product() /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Category_Product", "CategoryID", "CategoryID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Category_Product", new string[] { + "CategoryID"}, new string[] { + "CategoryID"}, IsForeignKey=true)] public global::NorthwindModel.Category Category { get @@ -4162,7 +4196,9 @@ public bool Discontinued /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Product_Order_Detail", "ProductID", "ProductID")] + [global::OpenRiaServices.EntityAssociationAttribute("Product_Order_Detail", new string[] { + "ProductID"}, new string[] { + "ProductID"})] public global::OpenRiaServices.Client.EntityCollection Order_Details { get @@ -4740,7 +4776,9 @@ public int RegionID /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Region_Territory", "RegionID", "RegionID")] + [global::OpenRiaServices.EntityAssociationAttribute("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"})] [global::System.ComponentModel.DataAnnotations.CompositionAttribute()] public global::OpenRiaServices.Client.EntityCollection Territories { @@ -4822,7 +4860,9 @@ public Territory() /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Region_Territory", "RegionID", "RegionID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Region_Territory", new string[] { + "RegionID"}, new string[] { + "RegionID"}, IsForeignKey=true)] public global::NorthwindModel.Region Region { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/TestProvider_Scenarios.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/TestProvider_Scenarios.g.cs index 4218c6509..35047df51 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/TestProvider_Scenarios.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/TestProvider_Scenarios.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -77,7 +76,11 @@ public A() /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("A_B", "BID1, BID2", "ID1, ID2", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("A_B", new string[] { + "BID1", + "BID2"}, new string[] { + "ID1", + "ID2"}, IsForeignKey=true)] public global::TestDomainServices.B B { get @@ -351,7 +354,11 @@ public B() /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("B_C", "ID1, ID2", "BID1, BID2")] + [global::OpenRiaServices.EntityAssociationAttribute("B_C", new string[] { + "ID1", + "ID2"}, new string[] { + "BID1", + "BID2"})] [global::System.ComponentModel.DataAnnotations.DisplayAttribute(Description="Cs")] public global::OpenRiaServices.Client.EntityCollection Cs { @@ -534,7 +541,9 @@ public int BID2 /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("C_D_Ref1", "DID_Ref1", "ID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("C_D_Ref1", new string[] { + "DID_Ref1"}, new string[] { + "ID"}, IsForeignKey=true)] [global::System.ComponentModel.DataAnnotations.DisplayAttribute(Description="D_Ref1")] public global::TestDomainServices.D D_Ref1 { @@ -578,7 +587,9 @@ public int BID2 /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("C_D_Ref2", "DID_Ref2", "ID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("C_D_Ref2", new string[] { + "DID_Ref2"}, new string[] { + "ID"}, IsForeignKey=true)] public global::TestDomainServices.D D_Ref2 { get @@ -766,7 +777,9 @@ public int CartId /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("CartItem_Cart", "CartId", "CartItemId")] + [global::OpenRiaServices.EntityAssociationAttribute("CartItem_Cart", new string[] { + "CartId"}, new string[] { + "CartItemId"})] [global::System.ComponentModel.DataAnnotations.EditableAttribute(false)] [global::System.ComponentModel.ReadOnlyAttribute(true)] public global::OpenRiaServices.Client.EntityCollection Items @@ -849,7 +862,9 @@ public CartItem() /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("CartItem_Cart", "CartItemId", "CartId", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("CartItem_Cart", new string[] { + "CartItemId"}, new string[] { + "CartId"}, IsForeignKey=true)] public global::TestDomainServices.Cart Cart { get @@ -1194,7 +1209,9 @@ public byte[] BinaryData /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("C_D_Ref1", "ID", "DID_Ref1")] + [global::OpenRiaServices.EntityAssociationAttribute("C_D_Ref1", new string[] { + "ID"}, new string[] { + "DID_Ref1"})] public global::TestDomainServices.C C { get @@ -1229,7 +1246,9 @@ public byte[] BinaryData /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("D_D", "DSelfRef_ID1", "ID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("D_D", new string[] { + "DSelfRef_ID1"}, new string[] { + "ID"}, IsForeignKey=true)] public global::TestDomainServices.D D1 { get @@ -1272,7 +1291,9 @@ public byte[] BinaryData /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("D_D2", "DSelfRef_ID2", "ID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("D_D2", new string[] { + "DSelfRef_ID2"}, new string[] { + "ID"}, IsForeignKey=true)] public global::TestDomainServices.D D2 { get @@ -1315,7 +1336,9 @@ public byte[] BinaryData /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("D_D2", "ID", "DSelfRef_ID2")] + [global::OpenRiaServices.EntityAssociationAttribute("D_D2", new string[] { + "ID"}, new string[] { + "DSelfRef_ID2"})] public global::TestDomainServices.D D2_BackRef { get @@ -1350,7 +1373,9 @@ public byte[] BinaryData /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("D_D", "ID", "DSelfRef_ID1")] + [global::OpenRiaServices.EntityAssociationAttribute("D_D", new string[] { + "ID"}, new string[] { + "DSelfRef_ID1"})] public global::OpenRiaServices.Client.EntityCollection Ds { get @@ -5477,7 +5502,9 @@ public int ID /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Parent_Child", "ParentID", "ID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Parent_Child", new string[] { + "ParentID"}, new string[] { + "ID"}, IsForeignKey=true)] public global::TestDomainServices.NullableFKParent Parent { get @@ -5520,7 +5547,9 @@ public int ID /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Parent_Child_Singleton", "ParentID_Singleton", "ID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("Parent_Child_Singleton", new string[] { + "ParentID_Singleton"}, new string[] { + "ID"}, IsForeignKey=true)] public global::TestDomainServices.NullableFKParent Parent2 { get @@ -5671,7 +5700,9 @@ public NullableFKParent() /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Parent_Child_Singleton", "ID", "ParentID_Singleton")] + [global::OpenRiaServices.EntityAssociationAttribute("Parent_Child_Singleton", new string[] { + "ID"}, new string[] { + "ParentID_Singleton"})] public global::TestDomainServices.NullableFKChild Child { get @@ -5706,7 +5737,9 @@ public NullableFKParent() /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("Parent_Child", "ID", "ParentID")] + [global::OpenRiaServices.EntityAssociationAttribute("Parent_Child", new string[] { + "ID"}, new string[] { + "ParentID"})] public global::OpenRiaServices.Client.EntityCollection Children { get @@ -6172,7 +6205,9 @@ public RoundtripOriginal_TestEntity2() /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("RTO_RTO2", "ID", "ID")] + [global::OpenRiaServices.EntityAssociationAttribute("RTO_RTO2", new string[] { + "ID"}, new string[] { + "ID"})] public global::TestDomainServices.RoundtripOriginal_TestEntity AssocProp { get @@ -6557,7 +6592,9 @@ public TestCycles() /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("TestCycle_Parent", "ParentName", "Name", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("TestCycle_Parent", new string[] { + "ParentName"}, new string[] { + "Name"}, IsForeignKey=true)] public global::TestDomainServices.TestCycles IncludedT { get @@ -6600,7 +6637,9 @@ public TestCycles() /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("TestCycle_Parent", "Name", "ParentName")] + [global::OpenRiaServices.EntityAssociationAttribute("TestCycle_Parent", new string[] { + "Name"}, new string[] { + "ParentName"})] public global::OpenRiaServices.Client.EntityCollection IncludedTs { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/TestProvider_Scenarios.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/TestProvider_Scenarios.g.vb index fd111b1d3..b4492d645 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/TestProvider_Scenarios.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/TestProvider_Scenarios.g.vb @@ -1,7 +1,6 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -96,7 +95,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property B() As Global.TestDomainServices.B Get If (Me._b Is Nothing) Then @@ -339,7 +338,7 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ Public ReadOnly Property Cs() As Global.OpenRiaServices.Client.EntityCollection(Of Global.TestDomainServices.C) Get @@ -515,7 +514,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ Public Property D_Ref1() As Global.TestDomainServices.D Get @@ -549,7 +548,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property D_Ref2() As Global.TestDomainServices.D Get If (Me._d_Ref2 Is Nothing) Then @@ -717,7 +716,7 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ Public ReadOnly Property Items() As Global.OpenRiaServices.Client.EntityCollection(Of Global.TestDomainServices.CartItem) @@ -800,7 +799,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Cart() As Global.TestDomainServices.Cart Get If (Me._cart Is Nothing) Then @@ -1125,7 +1124,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property C() As Global.TestDomainServices.C Get If (Me._c Is Nothing) Then @@ -1153,7 +1152,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property D1() As Global.TestDomainServices.D Get If (Me._d1 Is Nothing) Then @@ -1186,7 +1185,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property D2() As Global.TestDomainServices.D Get If (Me._d2 Is Nothing) Then @@ -1219,7 +1218,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property D2_BackRef() As Global.TestDomainServices.D Get If (Me._d2_BackRef Is Nothing) Then @@ -1247,7 +1246,7 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Ds() As Global.OpenRiaServices.Client.EntityCollection(Of Global.TestDomainServices.D) Get If (Me._ds Is Nothing) Then @@ -5162,7 +5161,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Parent() As Global.TestDomainServices.NullableFKParent Get If (Me._parent Is Nothing) Then @@ -5195,7 +5194,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Parent2() As Global.TestDomainServices.NullableFKParent Get If (Me._parent2 Is Nothing) Then @@ -5330,7 +5329,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property Child() As Global.TestDomainServices.NullableFKChild Get If (Me._child Is Nothing) Then @@ -5358,7 +5357,7 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Children() As Global.OpenRiaServices.Client.EntityCollection(Of Global.TestDomainServices.NullableFKChild) Get If (Me._children Is Nothing) Then @@ -5802,7 +5801,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property AssocProp() As Global.TestDomainServices.RoundtripOriginal_TestEntity Get If (Me._assocProp Is Nothing) Then @@ -6167,7 +6166,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property IncludedT() As Global.TestDomainServices.TestCycles Get If (Me._includedT Is Nothing) Then @@ -6200,7 +6199,7 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property IncludedTs() As Global.OpenRiaServices.Client.EntityCollection(Of Global.TestDomainServices.TestCycles) Get If (Me._includedTs Is Nothing) Then diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/TestProvider_Scenarios_CodeGen.g.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/TestProvider_Scenarios_CodeGen.g.cs index a67ac8c89..d93046d1b 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/TestProvider_Scenarios_CodeGen.g.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/TestProvider_Scenarios_CodeGen.g.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -77,7 +76,11 @@ public A() /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("A_B", "BID1, BID2", "ID1, ID2", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("A_B", new string[] { + "BID1", + "BID2"}, new string[] { + "ID1", + "ID2"}, IsForeignKey=true)] public global::TestDomainServices.B B { get @@ -351,7 +354,11 @@ public B() /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("B_C", "ID1, ID2", "BID1, BID2")] + [global::OpenRiaServices.EntityAssociationAttribute("B_C", new string[] { + "ID1", + "ID2"}, new string[] { + "BID1", + "BID2"})] [global::System.ComponentModel.DataAnnotations.DisplayAttribute(Description="Cs")] public global::OpenRiaServices.Client.EntityCollection Cs { @@ -534,7 +541,9 @@ public int BID2 /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("C_D_Ref1", "DID_Ref1", "ID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("C_D_Ref1", new string[] { + "DID_Ref1"}, new string[] { + "ID"}, IsForeignKey=true)] [global::System.ComponentModel.DataAnnotations.DisplayAttribute(Description="D_Ref1")] public global::TestDomainServices.D D_Ref1 { @@ -578,7 +587,9 @@ public int BID2 /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("C_D_Ref2", "DID_Ref2", "ID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("C_D_Ref2", new string[] { + "DID_Ref2"}, new string[] { + "ID"}, IsForeignKey=true)] public global::TestDomainServices.D D_Ref2 { get @@ -792,7 +803,9 @@ public byte[] BinaryData /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("C_D_Ref1", "ID", "DID_Ref1")] + [global::OpenRiaServices.EntityAssociationAttribute("C_D_Ref1", new string[] { + "ID"}, new string[] { + "DID_Ref1"})] public global::TestDomainServices.C C { get @@ -827,7 +840,9 @@ public byte[] BinaryData /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("D_D", "DSelfRef_ID1", "ID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("D_D", new string[] { + "DSelfRef_ID1"}, new string[] { + "ID"}, IsForeignKey=true)] public global::TestDomainServices.D D1 { get @@ -870,7 +885,9 @@ public byte[] BinaryData /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("D_D2", "DSelfRef_ID2", "ID", IsForeignKey=true)] + [global::OpenRiaServices.EntityAssociationAttribute("D_D2", new string[] { + "DSelfRef_ID2"}, new string[] { + "ID"}, IsForeignKey=true)] public global::TestDomainServices.D D2 { get @@ -913,7 +930,9 @@ public byte[] BinaryData /// /// Gets or sets the associated entity. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("D_D2", "ID", "DSelfRef_ID2")] + [global::OpenRiaServices.EntityAssociationAttribute("D_D2", new string[] { + "ID"}, new string[] { + "DSelfRef_ID2"})] public global::TestDomainServices.D D2_BackRef { get @@ -948,7 +967,9 @@ public byte[] BinaryData /// /// Gets the collection of associated entity instances. /// - [global::System.ComponentModel.DataAnnotations.AssociationAttribute("D_D", "ID", "DSelfRef_ID1")] + [global::OpenRiaServices.EntityAssociationAttribute("D_D", new string[] { + "ID"}, new string[] { + "DSelfRef_ID1"})] public global::OpenRiaServices.Client.EntityCollection Ds { get diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/TestProvider_Scenarios_CodeGen.g.vb b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/TestProvider_Scenarios_CodeGen.g.vb index e051450e7..c895f8c18 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/TestProvider_Scenarios_CodeGen.g.vb +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Baselines/FullTypeNames/Scenarios/TestProvider_Scenarios_CodeGen.g.vb @@ -1,7 +1,6 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -96,7 +95,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property B() As Global.TestDomainServices.B Get If (Me._b Is Nothing) Then @@ -339,7 +338,7 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ Public ReadOnly Property Cs() As Global.OpenRiaServices.Client.EntityCollection(Of Global.TestDomainServices.C) Get @@ -515,7 +514,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ Public Property D_Ref1() As Global.TestDomainServices.D Get @@ -549,7 +548,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property D_Ref2() As Global.TestDomainServices.D Get If (Me._d_Ref2 Is Nothing) Then @@ -752,7 +751,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property C() As Global.TestDomainServices.C Get If (Me._c Is Nothing) Then @@ -780,7 +779,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property D1() As Global.TestDomainServices.D Get If (Me._d1 Is Nothing) Then @@ -813,7 +812,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property D2() As Global.TestDomainServices.D Get If (Me._d2 Is Nothing) Then @@ -846,7 +845,7 @@ Namespace TestDomainServices ''' ''' Gets or sets the associated entity. ''' - _ + _ Public Property D2_BackRef() As Global.TestDomainServices.D Get If (Me._d2_BackRef Is Nothing) Then @@ -874,7 +873,7 @@ Namespace TestDomainServices ''' ''' Gets the collection of associated entity instances. ''' - _ + _ Public ReadOnly Property Ds() As Global.OpenRiaServices.Client.EntityCollection(Of Global.TestDomainServices.D) Get If (Me._ds Is Nothing) Then diff --git a/src/Test/OpenRiaservices.EndToEnd.Wcf.Test/Data/InvokeOperationTests.cs b/src/Test/OpenRiaservices.EndToEnd.Wcf.Test/Data/InvokeOperationTests.cs index 583450066..d9fa07f42 100644 --- a/src/Test/OpenRiaservices.EndToEnd.Wcf.Test/Data/InvokeOperationTests.cs +++ b/src/Test/OpenRiaservices.EndToEnd.Wcf.Test/Data/InvokeOperationTests.cs @@ -30,7 +30,7 @@ public void InvokeOperation_RoundtripDouble() { TestDomainServices.TestProvider_Scenarios ctxt = new TestDomainServices.TestProvider_Scenarios(TestURIs.TestProvider_Scenarios); - Double d = Double.Parse("9.2233720368547758E+18"); + Double d = 9.2233720368547758E+18; InvokeOperation invoke = ctxt.RoundtripDouble(d);