diff --git a/src/OpenRiaServices.Client/Framework/EntityAssociationAttribute.cs b/src/OpenRiaServices.Client/Framework/EntityAssociationAttribute.cs
index 99d42e94..f84c4ce1 100644
--- a/src/OpenRiaServices.Client/Framework/EntityAssociationAttribute.cs
+++ b/src/OpenRiaServices.Client/Framework/EntityAssociationAttribute.cs
@@ -1,20 +1,20 @@
using System;
using System.Collections.Generic;
+#nullable enable
#pragma warning disable CS3015 // Type has no accessible constructors which use only CLS-compliant types
-namespace OpenRiaServices
+namespace System.ComponentModel.DataAnnotations
{
///
- /// Used to mark an Entity member as an association
+ /// 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
+ /// Create an instance that defines an association between two entities, using any number of key members.
///
/// The name of the association. For bi-directional associations,
/// the name must be the same on both sides of the association
@@ -26,7 +26,7 @@ public EntityAssociationAttribute(string name, string[] thisKey, string[] otherK
ThisKeyMembers = thisKey ?? throw new ArgumentNullException(nameof(thisKey));
OtherKeyMembers = otherKey ?? throw new ArgumentNullException(nameof(otherKey));
- if (name .Length == 0)
+ 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));
@@ -34,6 +34,27 @@ public EntityAssociationAttribute(string name, string[] thisKey, string[] otherK
throw new ArgumentException("OtherKey cannot be empty", nameof(otherKey));
}
+ ///
+ /// Create an instance that defines an association using a single key member.
+ ///
+ /// The name of the association. For bi-directional associations,
+ /// the name must be the same on both sides of the association
+ /// A single property name of the key value on this side of the association
+ /// A single property name of the key value on the other side of the association
+ public EntityAssociationAttribute(string name, string thisKey, string otherKey)
+ {
+ if (string.IsNullOrEmpty(name))
+ throw new ArgumentException("Name cannot be empty", nameof(name));
+ if (string.IsNullOrEmpty(thisKey))
+ throw new ArgumentException("ThisKey cannot be empty", nameof(thisKey));
+ if (string.IsNullOrEmpty(otherKey))
+ throw new ArgumentException("OtherKey cannot be empty", nameof(otherKey));
+
+ Name = name;
+ ThisKeyMembers = [thisKey];
+ OtherKeyMembers = [otherKey];
+ }
+
///
/// Gets the name of the association. For bi-directional associations, the name must
/// be the same on both sides of the association
@@ -49,12 +70,12 @@ public EntityAssociationAttribute(string name, string[] thisKey, string[] otherK
///
/// Gets the collection of individual key members specified in the ThisKey string.
///
- public IReadOnlyCollection ThisKeyMembers { get; }
+ public IReadOnlyList ThisKeyMembers { get; }
///
/// Gets the collection of individual key members specified in the OtherKey string.
///
- public IReadOnlyCollection OtherKeyMembers { get; }
+ public IReadOnlyList OtherKeyMembers { get; }
///
/// Gets or sets the key value on this side of the association
diff --git a/src/OpenRiaServices.Client/Test/Client.Test/OpenRiaServices.Client.Test.csproj b/src/OpenRiaServices.Client/Test/Client.Test/OpenRiaServices.Client.Test.csproj
index 940b60b2..633e6221 100644
--- a/src/OpenRiaServices.Client/Test/Client.Test/OpenRiaServices.Client.Test.csproj
+++ b/src/OpenRiaServices.Client/Test/Client.Test/OpenRiaServices.Client.Test.csproj
@@ -1,17 +1,10 @@
- 108
net472;net6.0-windows;net8.0-windows
1.0.0.0
true
$(DefineConstants);HAS_COLLECTIONVIEW
-
-
-
- $(NoWarn);CS0618
-
-
diff --git a/src/OpenRiaServices.Client/Test/Client.Vb.Test/OpenRiaServices.Client.Vb.Test.csproj b/src/OpenRiaServices.Client/Test/Client.Vb.Test/OpenRiaServices.Client.Vb.Test.csproj
index d27bf51f..0b3eacfd 100644
--- a/src/OpenRiaServices.Client/Test/Client.Vb.Test/OpenRiaServices.Client.Vb.Test.csproj
+++ b/src/OpenRiaServices.Client/Test/Client.Vb.Test/OpenRiaServices.Client.Vb.Test.csproj
@@ -3,7 +3,6 @@
net472
TRACE;DEBUG;VBTests
- 108
OpenRiaServices.Client.Test
diff --git a/src/OpenRiaServices.EntityFramework/Test/CodeFirstModel/EFCodeFirstModels.csproj b/src/OpenRiaServices.EntityFramework/Test/CodeFirstModel/EFCodeFirstModels.csproj
index 9596a371..9d5d3741 100644
--- a/src/OpenRiaServices.EntityFramework/Test/CodeFirstModel/EFCodeFirstModels.csproj
+++ b/src/OpenRiaServices.EntityFramework/Test/CodeFirstModel/EFCodeFirstModels.csproj
@@ -1,6 +1,5 @@
- 618
CodeFirstModels
CodeFirstModels
net472;net6.0
diff --git a/src/OpenRiaServices.Tools/Framework/MetadataPipeline/EntityAssociationAttributeBuilder.cs b/src/OpenRiaServices.Tools/Framework/MetadataPipeline/EntityAssociationAttributeBuilder.cs
index a9ccc4b5..da24db5e 100644
--- a/src/OpenRiaServices.Tools/Framework/MetadataPipeline/EntityAssociationAttributeBuilder.cs
+++ b/src/OpenRiaServices.Tools/Framework/MetadataPipeline/EntityAssociationAttributeBuilder.cs
@@ -16,36 +16,48 @@ internal class EntityAssociationAttributeBuilder : ICustomAttributeBuilder
///
public AttributeDeclaration GetAttributeDeclaration(Attribute attribute)
{
- AttributeDeclaration attributeDeclaration = new AttributeDeclaration(typeof(EntityAssociationAttribute));
+ string name;
+ string[] thisKey, otherKey;
+ bool isForeignKey;
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);
- }
+ name = entityAssociation.Name;
+ thisKey = (string[])entityAssociation.ThisKeyMembers;
+ otherKey = (string[])entityAssociation.OtherKeyMembers;
+ isForeignKey = entityAssociation.IsForeignKey;
}
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);
- }
+ name = associationAttribute.Name;
+ thisKey = associationAttribute.ThisKeyMembers.ToArray();
+ otherKey = associationAttribute.OtherKeyMembers.ToArray();
+ isForeignKey = associationAttribute.IsForeignKey;
}
else
{
return null;
}
+ // Generate the attribute declaration
+ // If there is only a single key member, we use string based constructor
+ AttributeDeclaration attributeDeclaration = new AttributeDeclaration(typeof(EntityAssociationAttribute));
+ attributeDeclaration.ConstructorArguments.Add(name);
+ if (thisKey.Length == 1 && otherKey.Length == 1)
+ {
+ attributeDeclaration.ConstructorArguments.Add(thisKey[0]);
+ attributeDeclaration.ConstructorArguments.Add(otherKey[0]);
+ }
+ else
+ {
+ attributeDeclaration.ConstructorArguments.Add(thisKey);
+ attributeDeclaration.ConstructorArguments.Add(otherKey);
+ }
+
+ if (isForeignKey)
+ {
+ attributeDeclaration.NamedParameters.Add(nameof(EntityAssociationAttribute.IsForeignKey), true);
+ }
return attributeDeclaration;
}
}
diff --git a/src/OpenRiaServices.Tools/Test/CodeGenExternalAttributeTests.cs b/src/OpenRiaServices.Tools/Test/CodeGenExternalAttributeTests.cs
index c2ec0a2d..d29bb507 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;",
- "[EntityAssociation(\"Employee_PersonalDetails\", new string[] { \"EmployeeID\"}, new string[] { \"UniqueID\"}, IsForeignKey=true)] [ExternalReference()]",
+ "[EntityAssociation(\"Employee_PersonalDetails\", \"EmployeeID\", \"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/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 7d9a0dae..302c8e0f 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
@@ -1750,9 +1750,7 @@ public string Name
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("State_County", new string[] {
- "StateName"}, new string[] {
- "Name"}, IsForeignKey=true)]
+ [EntityAssociation("State_County", "StateName", "Name", IsForeignKey=true)]
public State State
{
get
@@ -1930,9 +1928,7 @@ public State()
///
[CustomValidation(typeof(CountiesValidator), "AreCountiesValid")]
[Editable(false)]
- [EntityAssociation("State_County", new string[] {
- "Name"}, new string[] {
- "StateName"})]
+ [EntityAssociation("State_County", "Name", "StateName")]
[ReadOnly(true)]
public EntityCollection Counties
{
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 d71ecfe6..ce0da503 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
@@ -1628,7 +1628,7 @@ Namespace Cities
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property State() As State
Get
If (Me._state Is Nothing) Then
@@ -1793,7 +1793,7 @@ Namespace Cities
'''
_
Public ReadOnly Property Counties() As EntityCollection(Of County)
Get
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 ca1ba208..250a9eca 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
@@ -295,9 +295,7 @@ public string LoginID
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Employee_Employee", new string[] {
- "ManagerID"}, new string[] {
- "EmployeeID"}, IsForeignKey=true)]
+ [EntityAssociation("Employee_Employee", "ManagerID", "EmployeeID", IsForeignKey=true)]
public Employee Manager
{
get
@@ -441,9 +439,7 @@ public string NationalIDNumber
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Employee_PurchaseOrder", new string[] {
- "EmployeeID"}, new string[] {
- "EmployeeID"})]
+ [EntityAssociation("Employee_PurchaseOrder", "EmployeeID", "EmployeeID")]
public EntityCollection PurchaseOrders
{
get
@@ -459,9 +455,7 @@ public EntityCollection PurchaseOrders
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Employee_Employee", new string[] {
- "EmployeeID"}, new string[] {
- "ManagerID"})]
+ [EntityAssociation("Employee_Employee", "EmployeeID", "ManagerID")]
public EntityCollection Reports
{
get
@@ -1265,9 +1259,7 @@ public Nullable ProductSubcategoryID
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Product_PurchaseOrderDetail", new string[] {
- "ProductID"}, new string[] {
- "ProductID"})]
+ [EntityAssociation("Product_PurchaseOrderDetail", "ProductID", "ProductID")]
public EntityCollection PurchaseOrderDetails
{
get
@@ -1637,9 +1629,7 @@ public PurchaseOrder()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Employee_PurchaseOrder", new string[] {
- "EmployeeID"}, new string[] {
- "EmployeeID"}, IsForeignKey=true)]
+ [EntityAssociation("Employee_PurchaseOrder", "EmployeeID", "EmployeeID", IsForeignKey=true)]
public Employee Employee
{
get
@@ -1779,9 +1769,7 @@ public DateTime OrderDate
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("PurchaseOrder_PurchaseOrderDetail", new string[] {
- "PurchaseOrderID"}, new string[] {
- "PurchaseOrderID"})]
+ [EntityAssociation("PurchaseOrder_PurchaseOrderDetail", "PurchaseOrderID", "PurchaseOrderID")]
public EntityCollection PurchaseOrderDetails
{
get
@@ -2217,9 +2205,7 @@ public short OrderQty
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Product_PurchaseOrderDetail", new string[] {
- "ProductID"}, new string[] {
- "ProductID"}, IsForeignKey=true)]
+ [EntityAssociation("Product_PurchaseOrderDetail", "ProductID", "ProductID", IsForeignKey=true)]
public Product Product
{
get
@@ -2287,9 +2273,7 @@ public int ProductID
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("PurchaseOrder_PurchaseOrderDetail", new string[] {
- "PurchaseOrderID"}, new string[] {
- "PurchaseOrderID"}, IsForeignKey=true)]
+ [EntityAssociation("PurchaseOrder_PurchaseOrderDetail", "PurchaseOrderID", "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 3f0fb424..bc66fdc8 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
@@ -311,7 +311,7 @@ Namespace AdventureWorksModel
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Manager() As Employee
Get
If (Me._manager Is Nothing) Then
@@ -430,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
@@ -443,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
@@ -1213,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
@@ -1567,7 +1567,7 @@ Namespace AdventureWorksModel
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Employee() As Employee
Get
If (Me._employee Is Nothing) Then
@@ -1685,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
@@ -2096,7 +2096,7 @@ Namespace AdventureWorksModel
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Product() As Product
Get
If (Me._product Is Nothing) Then
@@ -2151,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 7cc607d4..f2ef17dd 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
@@ -291,9 +291,7 @@ public string LoginID
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("FK_Employee_Employee_ManagerID", new string[] {
- "ManagerID"}, new string[] {
- "EmployeeID"}, IsForeignKey=true)]
+ [EntityAssociation("FK_Employee_Employee_ManagerID", "ManagerID", "EmployeeID", IsForeignKey=true)]
public Employee Manager
{
get
@@ -1185,9 +1183,7 @@ public Nullable ProductSubcategoryID
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("FK_PurchaseOrderDetail_Product_ProductID", new string[] {
- "ProductID"}, new string[] {
- "ProductID"})]
+ [EntityAssociation("FK_PurchaseOrderDetail_Product_ProductID", "ProductID", "ProductID")]
public EntityCollection PurchaseOrderDetails
{
get
@@ -1649,9 +1645,7 @@ public DateTime OrderDate
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("FK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID", new string[] {
- "PurchaseOrderID"}, new string[] {
- "PurchaseOrderID"})]
+ [EntityAssociation("FK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID", "PurchaseOrderID", "PurchaseOrderID")]
public EntityCollection PurchaseOrderDetails
{
get
@@ -2080,9 +2074,7 @@ public short OrderQty
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("FK_PurchaseOrderDetail_Product_ProductID", new string[] {
- "ProductID"}, new string[] {
- "ProductID"}, IsForeignKey=true)]
+ [EntityAssociation("FK_PurchaseOrderDetail_Product_ProductID", "ProductID", "ProductID", IsForeignKey=true)]
public Product Product
{
get
@@ -2150,9 +2142,7 @@ public int ProductID
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("FK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID", new string[] {
- "PurchaseOrderID"}, new string[] {
- "PurchaseOrderID"}, IsForeignKey=true)]
+ [EntityAssociation("FK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID", "PurchaseOrderID", "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 2e40f682..3ab6cc56 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
@@ -307,7 +307,7 @@ Namespace EFCoreModels.AdventureWorks
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Manager() As Employee
Get
If (Me._manager Is Nothing) Then
@@ -1151,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
@@ -1585,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
@@ -1990,7 +1990,7 @@ Namespace EFCoreModels.AdventureWorks
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Product() As Product
Get
If (Me._product Is Nothing) Then
@@ -2045,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 d76ed628..a7a6ed2b 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
@@ -295,9 +295,7 @@ public string LoginID
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Employee_Employee", new string[] {
- "ManagerID"}, new string[] {
- "EmployeeID"}, IsForeignKey=true)]
+ [EntityAssociation("Employee_Employee", "ManagerID", "EmployeeID", IsForeignKey=true)]
public Employee Manager
{
get
@@ -441,9 +439,7 @@ public string NationalIDNumber
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Employee_PurchaseOrder", new string[] {
- "EmployeeID"}, new string[] {
- "EmployeeID"})]
+ [EntityAssociation("Employee_PurchaseOrder", "EmployeeID", "EmployeeID")]
public EntityCollection PurchaseOrders
{
get
@@ -459,9 +455,7 @@ public EntityCollection PurchaseOrders
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Employee_Employee", new string[] {
- "EmployeeID"}, new string[] {
- "ManagerID"})]
+ [EntityAssociation("Employee_Employee", "EmployeeID", "ManagerID")]
public EntityCollection Reports
{
get
@@ -1265,9 +1259,7 @@ public Nullable ProductSubcategoryID
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Product_PurchaseOrderDetail", new string[] {
- "ProductID"}, new string[] {
- "ProductID"})]
+ [EntityAssociation("Product_PurchaseOrderDetail", "ProductID", "ProductID")]
public EntityCollection PurchaseOrderDetails
{
get
@@ -1637,9 +1629,7 @@ public PurchaseOrder()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Employee_PurchaseOrder", new string[] {
- "EmployeeID"}, new string[] {
- "EmployeeID"}, IsForeignKey=true)]
+ [EntityAssociation("Employee_PurchaseOrder", "EmployeeID", "EmployeeID", IsForeignKey=true)]
public Employee Employee
{
get
@@ -1779,9 +1769,7 @@ public DateTime OrderDate
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("PurchaseOrder_PurchaseOrderDetail", new string[] {
- "PurchaseOrderID"}, new string[] {
- "PurchaseOrderID"})]
+ [EntityAssociation("PurchaseOrder_PurchaseOrderDetail", "PurchaseOrderID", "PurchaseOrderID")]
public EntityCollection PurchaseOrderDetails
{
get
@@ -2217,9 +2205,7 @@ public short OrderQty
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Product_PurchaseOrderDetail", new string[] {
- "ProductID"}, new string[] {
- "ProductID"}, IsForeignKey=true)]
+ [EntityAssociation("Product_PurchaseOrderDetail", "ProductID", "ProductID", IsForeignKey=true)]
public Product Product
{
get
@@ -2287,9 +2273,7 @@ public int ProductID
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("PurchaseOrder_PurchaseOrderDetail", new string[] {
- "PurchaseOrderID"}, new string[] {
- "PurchaseOrderID"}, IsForeignKey=true)]
+ [EntityAssociation("PurchaseOrder_PurchaseOrderDetail", "PurchaseOrderID", "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 d57ddc66..2c186843 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
@@ -311,7 +311,7 @@ Namespace DbContextModels.AdventureWorks
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Manager() As Employee
Get
If (Me._manager Is Nothing) Then
@@ -430,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
@@ -443,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
@@ -1213,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
@@ -1567,7 +1567,7 @@ Namespace DbContextModels.AdventureWorks
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Employee() As Employee
Get
If (Me._employee Is Nothing) Then
@@ -1685,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
@@ -2096,7 +2096,7 @@ Namespace DbContextModels.AdventureWorks
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Product() As Product
Get
If (Me._product Is Nothing) Then
@@ -2151,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 d483af37..1f90ba3f 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
@@ -169,9 +169,7 @@ public byte[] Picture
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Category_Product", new string[] {
- "CategoryID"}, new string[] {
- "CategoryID"})]
+ [EntityAssociation("Category_Product", "CategoryID", "CategoryID")]
public EntityCollection Products
{
get
@@ -503,9 +501,7 @@ public string Fax
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Customer_Order", new string[] {
- "CustomerID"}, new string[] {
- "CustomerID"})]
+ [EntityAssociation("Customer_Order", "CustomerID", "CustomerID")]
public EntityCollection Orders
{
get
@@ -717,9 +713,7 @@ public Order()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Customer_Order", new string[] {
- "CustomerID"}, new string[] {
- "CustomerID"}, IsForeignKey=true)]
+ [EntityAssociation("Customer_Order", "CustomerID", "CustomerID", IsForeignKey=true)]
public Customer Customer
{
get
@@ -866,9 +860,7 @@ public Nullable Freight
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Order_Order_Detail", new string[] {
- "OrderID"}, new string[] {
- "OrderID"})]
+ [EntityAssociation("Order_Order_Detail", "OrderID", "OrderID")]
public EntityCollection Order_Details
{
get
@@ -1283,9 +1275,7 @@ public float Discount
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Order_Order_Detail", new string[] {
- "OrderID"}, new string[] {
- "OrderID"}, IsForeignKey=true)]
+ [EntityAssociation("Order_Order_Detail", "OrderID", "OrderID", IsForeignKey=true)]
public Order Order
{
get
@@ -1355,9 +1345,7 @@ public int OrderID
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Product_Order_Detail", new string[] {
- "ProductID"}, new string[] {
- "ProductID"}, IsForeignKey=true)]
+ [EntityAssociation("Product_Order_Detail", "ProductID", "ProductID", IsForeignKey=true)]
public Product Product
{
get
@@ -1583,9 +1571,7 @@ public Product()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Category_Product", new string[] {
- "CategoryID"}, new string[] {
- "CategoryID"}, IsForeignKey=true)]
+ [EntityAssociation("Category_Product", "CategoryID", "CategoryID", IsForeignKey=true)]
public Category Category
{
get
@@ -1705,9 +1691,7 @@ public bool Discontinued
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Product_Order_Detail", new string[] {
- "ProductID"}, new string[] {
- "ProductID"})]
+ [EntityAssociation("Product_Order_Detail", "ProductID", "ProductID")]
public EntityCollection Order_Details
{
get
@@ -2286,9 +2270,7 @@ public int RegionID
/// Gets the collection of associated entity instances.
///
[Composition()]
- [EntityAssociation("Region_Territory", new string[] {
- "RegionID"}, new string[] {
- "RegionID"})]
+ [EntityAssociation("Region_Territory", "RegionID", "RegionID")]
public EntityCollection Territories
{
get
@@ -2369,9 +2351,7 @@ public Territory()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Region_Territory", new string[] {
- "RegionID"}, new string[] {
- "RegionID"}, IsForeignKey=true)]
+ [EntityAssociation("Region_Territory", "RegionID", "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 afdc7ab2..9a6d5cf7 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
@@ -169,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
@@ -485,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
@@ -709,7 +709,7 @@ Namespace NorthwindModel
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Customer() As Customer
Get
If (Me._customer Is Nothing) Then
@@ -830,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
@@ -1202,7 +1202,7 @@ Namespace NorthwindModel
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Order() As Order
Get
If (Me._order Is Nothing) Then
@@ -1259,7 +1259,7 @@ Namespace NorthwindModel
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Product() As Product
Get
If (Me._product Is Nothing) Then
@@ -1492,7 +1492,7 @@ Namespace NorthwindModel
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Category() As Category
Get
If (Me._category Is Nothing) Then
@@ -1591,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,7 +2109,7 @@ Namespace NorthwindModel
''' Gets the collection of associated entity instances.
'''
_
+ EntityAssociation("Region_Territory", "RegionID", "RegionID")> _
Public ReadOnly Property Territories() As EntityCollection(Of Territory)
Get
If (Me._territories Is Nothing) Then
@@ -2190,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 07944688..8a146682 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
@@ -169,9 +169,7 @@ public byte[] Picture
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Category_Product", new string[] {
- "CategoryID"}, new string[] {
- "CategoryID"})]
+ [EntityAssociation("Category_Product", "CategoryID", "CategoryID")]
public EntityCollection Products
{
get
@@ -503,9 +501,7 @@ public string Fax
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Customer_Order", new string[] {
- "CustomerID"}, new string[] {
- "CustomerID"})]
+ [EntityAssociation("Customer_Order", "CustomerID", "CustomerID")]
public EntityCollection Orders
{
get
@@ -717,9 +713,7 @@ public Order()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Customer_Order", new string[] {
- "CustomerID"}, new string[] {
- "CustomerID"}, IsForeignKey=true)]
+ [EntityAssociation("Customer_Order", "CustomerID", "CustomerID", IsForeignKey=true)]
public Customer Customer
{
get
@@ -866,9 +860,7 @@ public Nullable Freight
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Order_Order_Detail", new string[] {
- "OrderID"}, new string[] {
- "OrderID"})]
+ [EntityAssociation("Order_Order_Detail", "OrderID", "OrderID")]
public EntityCollection Order_Details
{
get
@@ -1283,9 +1275,7 @@ public float Discount
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Order_Order_Detail", new string[] {
- "OrderID"}, new string[] {
- "OrderID"}, IsForeignKey=true)]
+ [EntityAssociation("Order_Order_Detail", "OrderID", "OrderID", IsForeignKey=true)]
public Order Order
{
get
@@ -1355,9 +1345,7 @@ public int OrderID
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Product_Order_Detail", new string[] {
- "ProductID"}, new string[] {
- "ProductID"}, IsForeignKey=true)]
+ [EntityAssociation("Product_Order_Detail", "ProductID", "ProductID", IsForeignKey=true)]
public Product Product
{
get
@@ -1583,9 +1571,7 @@ public Product()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Category_Product", new string[] {
- "CategoryID"}, new string[] {
- "CategoryID"}, IsForeignKey=true)]
+ [EntityAssociation("Category_Product", "CategoryID", "CategoryID", IsForeignKey=true)]
public Category Category
{
get
@@ -1705,9 +1691,7 @@ public bool Discontinued
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Product_Order_Detail", new string[] {
- "ProductID"}, new string[] {
- "ProductID"})]
+ [EntityAssociation("Product_Order_Detail", "ProductID", "ProductID")]
public EntityCollection Order_Details
{
get
@@ -2286,9 +2270,7 @@ public int RegionID
/// Gets the collection of associated entity instances.
///
[Composition()]
- [EntityAssociation("Region_Territory", new string[] {
- "RegionID"}, new string[] {
- "RegionID"})]
+ [EntityAssociation("Region_Territory", "RegionID", "RegionID")]
public EntityCollection Territories
{
get
@@ -2369,9 +2351,7 @@ public Territory()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Region_Territory", new string[] {
- "RegionID"}, new string[] {
- "RegionID"}, IsForeignKey=true)]
+ [EntityAssociation("Region_Territory", "RegionID", "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 13e048d7..8b25d4b3 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
@@ -169,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
@@ -485,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
@@ -709,7 +709,7 @@ Namespace EFCoreModels.Northwind
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Customer() As Customer
Get
If (Me._customer Is Nothing) Then
@@ -830,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
@@ -1202,7 +1202,7 @@ Namespace EFCoreModels.Northwind
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Order() As Order
Get
If (Me._order Is Nothing) Then
@@ -1259,7 +1259,7 @@ Namespace EFCoreModels.Northwind
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Product() As Product
Get
If (Me._product Is Nothing) Then
@@ -1492,7 +1492,7 @@ Namespace EFCoreModels.Northwind
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Category() As Category
Get
If (Me._category Is Nothing) Then
@@ -1591,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,7 +2109,7 @@ Namespace EFCoreModels.Northwind
''' Gets the collection of associated entity instances.
'''
_
+ EntityAssociation("Region_Territory", "RegionID", "RegionID")> _
Public ReadOnly Property Territories() As EntityCollection(Of Territory)
Get
If (Me._territories Is Nothing) Then
@@ -2190,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 5c580f00..769580bd 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,9 +308,7 @@ public string LoginID
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Employee_Employee", new string[] {
- "ManagerID"}, new string[] {
- "EmployeeID"}, IsForeignKey=true)]
+ [EntityAssociation("Employee_Employee", "ManagerID", "EmployeeID", IsForeignKey=true)]
public Employee Manager
{
get
@@ -461,9 +459,7 @@ public string NationalIDNumber
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Employee_PurchaseOrder", new string[] {
- "EmployeeID"}, new string[] {
- "EmployeeID"})]
+ [EntityAssociation("Employee_PurchaseOrder", "EmployeeID", "EmployeeID")]
public EntityCollection PurchaseOrders
{
get
@@ -479,9 +475,7 @@ public EntityCollection PurchaseOrders
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Employee_Employee", new string[] {
- "EmployeeID"}, new string[] {
- "ManagerID"})]
+ [EntityAssociation("Employee_Employee", "EmployeeID", "ManagerID")]
public EntityCollection Reports
{
get
@@ -1170,9 +1164,7 @@ public Nullable ProductSubcategoryID
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Product_PurchaseOrderDetail", new string[] {
- "ProductID"}, new string[] {
- "ProductID"})]
+ [EntityAssociation("Product_PurchaseOrderDetail", "ProductID", "ProductID")]
public EntityCollection PurchaseOrderDetails
{
get
@@ -1559,9 +1551,7 @@ public PurchaseOrder()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Employee_PurchaseOrder", new string[] {
- "EmployeeID"}, new string[] {
- "EmployeeID"}, IsForeignKey=true)]
+ [EntityAssociation("Employee_PurchaseOrder", "EmployeeID", "EmployeeID", IsForeignKey=true)]
public Employee Employee
{
get
@@ -1708,9 +1698,7 @@ public DateTime OrderDate
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("PurchaseOrder_PurchaseOrderDetail", new string[] {
- "PurchaseOrderID"}, new string[] {
- "PurchaseOrderID"})]
+ [EntityAssociation("PurchaseOrder_PurchaseOrderDetail", "PurchaseOrderID", "PurchaseOrderID")]
public EntityCollection PurchaseOrderDetails
{
get
@@ -2167,9 +2155,7 @@ public short OrderQty
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Product_PurchaseOrderDetail", new string[] {
- "ProductID"}, new string[] {
- "ProductID"}, IsForeignKey=true)]
+ [EntityAssociation("Product_PurchaseOrderDetail", "ProductID", "ProductID", IsForeignKey=true)]
public Product Product
{
get
@@ -2238,9 +2224,7 @@ public int ProductID
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("PurchaseOrder_PurchaseOrderDetail", new string[] {
- "PurchaseOrderID"}, new string[] {
- "PurchaseOrderID"}, IsForeignKey=true)]
+ [EntityAssociation("PurchaseOrder_PurchaseOrderDetail", "PurchaseOrderID", "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 b5c98b88..000c3373 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 a4ee800e..d8542957 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
@@ -173,9 +173,7 @@ public byte[] Picture
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Category_Product", new string[] {
- "CategoryID"}, new string[] {
- "CategoryID"})]
+ [EntityAssociation("Category_Product", "CategoryID", "CategoryID")]
public EntityCollection Products
{
get
@@ -507,9 +505,7 @@ public string Fax
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Customer_Order", new string[] {
- "CustomerID"}, new string[] {
- "CustomerID"})]
+ [EntityAssociation("Customer_Order", "CustomerID", "CustomerID")]
public EntityCollection Orders
{
get
@@ -721,9 +717,7 @@ public Order()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Customer_Order", new string[] {
- "CustomerID"}, new string[] {
- "CustomerID"}, IsForeignKey=true)]
+ [EntityAssociation("Customer_Order", "CustomerID", "CustomerID", IsForeignKey=true)]
public Customer Customer
{
get
@@ -871,9 +865,7 @@ public Nullable Freight
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Order_Order_Detail", new string[] {
- "OrderID"}, new string[] {
- "OrderID"})]
+ [EntityAssociation("Order_Order_Detail", "OrderID", "OrderID")]
public EntityCollection Order_Details
{
get
@@ -1288,9 +1280,7 @@ public float Discount
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Order_Order_Detail", new string[] {
- "OrderID"}, new string[] {
- "OrderID"}, IsForeignKey=true)]
+ [EntityAssociation("Order_Order_Detail", "OrderID", "OrderID", IsForeignKey=true)]
public Order Order
{
get
@@ -1360,9 +1350,7 @@ public int OrderID
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Product_Order_Detail", new string[] {
- "ProductID"}, new string[] {
- "ProductID"}, IsForeignKey=true)]
+ [EntityAssociation("Product_Order_Detail", "ProductID", "ProductID", IsForeignKey=true)]
public Product Product
{
get
@@ -1588,9 +1576,7 @@ public Product()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Category_Product", new string[] {
- "CategoryID"}, new string[] {
- "CategoryID"}, IsForeignKey=true)]
+ [EntityAssociation("Category_Product", "CategoryID", "CategoryID", IsForeignKey=true)]
public Category Category
{
get
@@ -1710,9 +1696,7 @@ public bool Discontinued
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Product_Order_Detail", new string[] {
- "ProductID"}, new string[] {
- "ProductID"})]
+ [EntityAssociation("Product_Order_Detail", "ProductID", "ProductID")]
public EntityCollection Order_Details
{
get
@@ -2295,9 +2279,7 @@ public int RegionID
/// Gets the collection of associated entity instances.
///
[Composition()]
- [EntityAssociation("Region_Territory", new string[] {
- "RegionID"}, new string[] {
- "RegionID"})]
+ [EntityAssociation("Region_Territory", "RegionID", "RegionID")]
public EntityCollection Territories
{
get
@@ -2378,9 +2360,7 @@ public Territory()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Region_Territory", new string[] {
- "RegionID"}, new string[] {
- "RegionID"}, IsForeignKey=true)]
+ [EntityAssociation("Region_Territory", "RegionID", "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 bd3de896..0753ff72 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
@@ -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
@@ -2118,7 +2118,7 @@ Namespace DataTests.Northwind.LTS
''' Gets the collection of associated entity instances.
'''
_
+ EntityAssociation("Region_Territory", "RegionID", "RegionID")> _
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 4e768dab..8c14a1e5 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
@@ -159,9 +159,7 @@ public int CustomerId
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Customer_PreviousResidences", new string[] {
- "StateName"}, new string[] {
- "StateName"})]
+ [EntityAssociation("Customer_PreviousResidences", "StateName", "StateName")]
[ExternalReference()]
public EntityCollection PreviousResidences
{
@@ -501,9 +499,7 @@ public MockReport()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("R_C", new string[] {
- "CustomerId"}, new string[] {
- "CustomerId"})]
+ [EntityAssociation("R_C", "CustomerId", "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 29da4ecc..4bd9a3e5 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
@@ -153,7 +153,7 @@ Namespace TestDomainServices
'''
''' Gets the collection of associated entity instances.
'''
- _
Public ReadOnly Property PreviousResidences() As EntityCollection(Of Global.Cities.City)
Get
@@ -480,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 7d3cbddc..6fc8f8fc 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
@@ -336,9 +336,7 @@ public string NonThrowingProperty
//
// - An exception occurred generating the 'ThrowingEntityAssociationAttributeProperty' property on attribute of type 'TestDomainServices.ThrowingEntityAssociationAttribute'.
//
- [EntityAssociation("Association", new string[] {
- "ThrowingProperty"}, new string[] {
- "NonThrowingProperty"}, IsForeignKey=true)]
+ [EntityAssociation("Association", "ThrowingProperty", "NonThrowingProperty", IsForeignKey=true)]
public AttributeThrowingEntity ThrowingAssociation
{
get
@@ -376,9 +374,7 @@ public AttributeThrowingEntity ThrowingAssociation
//
// - An exception occurred generating the 'ThrowingEntityAssociationCollectionAttributeProperty' property on attribute of type 'TestDomainServices.ThrowingEntityAssociationCollectionAttribute'.
//
- [EntityAssociation("AssociationCollection", new string[] {
- "NonThrowingProperty"}, new string[] {
- "ThrowingProperty"})]
+ [EntityAssociation("AssociationCollection", "NonThrowingProperty", "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 ccae84cd..bc3c8286 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
@@ -332,7 +332,7 @@ Namespace TestDomainServices
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property ThrowingAssociation() As AttributeThrowingEntity
Get
If (Me._throwingAssociation Is Nothing) Then
@@ -362,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 27301b9e..82c87dd2 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
@@ -151,9 +151,7 @@ public AI_DetailDerived1()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Master_to_Derived1_Many", new string[] {
- "MasterID"}, new string[] {
- "ID"}, IsForeignKey=true)]
+ [EntityAssociation("Master_to_Derived1_Many", "MasterID", "ID", IsForeignKey=true)]
public AI_MasterDerived Master
{
get
@@ -230,9 +228,7 @@ public AI_DetailDerived2()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Master_to_Derived2_Many", new string[] {
- "MasterID"}, new string[] {
- "ID"}, IsForeignKey=true)]
+ [EntityAssociation("Master_to_Derived2_Many", "MasterID", "ID", IsForeignKey=true)]
public AI_MasterDerived Master
{
get
@@ -309,9 +305,7 @@ public AI_DetailDerived3()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Master_to_Derived3_One", new string[] {
- "MasterID"}, new string[] {
- "ID"}, IsForeignKey=true)]
+ [EntityAssociation("Master_to_Derived3_One", "MasterID", "ID", IsForeignKey=true)]
public AI_MasterDerived Master
{
get
@@ -388,9 +382,7 @@ public AI_DetailDerived4()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Master_to_Derived4_One", new string[] {
- "MasterID"}, new string[] {
- "ID"}, IsForeignKey=true)]
+ [EntityAssociation("Master_to_Derived4_One", "MasterID", "ID", IsForeignKey=true)]
public AI_MasterDerived Master
{
get
@@ -540,9 +532,7 @@ public AI_MasterDerived()
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Master_to_Derived1_Many", new string[] {
- "ID"}, new string[] {
- "MasterID"})]
+ [EntityAssociation("Master_to_Derived1_Many", "ID", "MasterID")]
public EntityCollection DetailDerived1s
{
get
@@ -558,9 +548,7 @@ public EntityCollection DetailDerived1s
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Master_to_Derived2_Many", new string[] {
- "ID"}, new string[] {
- "MasterID"})]
+ [EntityAssociation("Master_to_Derived2_Many", "ID", "MasterID")]
public EntityCollection DetailDerived2s
{
get
@@ -576,9 +564,7 @@ public EntityCollection DetailDerived2s
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Master_to_Derived3_One", new string[] {
- "ID"}, new string[] {
- "MasterID"})]
+ [EntityAssociation("Master_to_Derived3_One", "ID", "MasterID")]
public AI_DetailDerived3 DetailDerived3
{
get
@@ -613,9 +599,7 @@ public AI_DetailDerived3 DetailDerived3
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Master_to_Derived4_One", new string[] {
- "ID"}, new string[] {
- "MasterID"})]
+ [EntityAssociation("Master_to_Derived4_One", "ID", "MasterID")]
public AI_DetailDerived4 DetailDerived4
{
get
@@ -1045,9 +1029,7 @@ public string OperationResult
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Child_Parent", new string[] {
- "ParentID"}, new string[] {
- "ID"}, IsForeignKey=true)]
+ [EntityAssociation("Child_Parent", "ParentID", "ID", IsForeignKey=true)]
public CI_Parent Parent
{
get
@@ -1233,9 +1215,7 @@ public CI_Parent()
/// Gets the collection of associated entity instances.
///
[Composition()]
- [EntityAssociation("Child_Parent", new string[] {
- "ID"}, new string[] {
- "ParentID"})]
+ [EntityAssociation("Child_Parent", "ID", "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 f2a854d1..0b94fde8 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
@@ -154,7 +154,7 @@ Namespace TestDomainServices
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Master() As AI_MasterDerived
Get
If (Me._master Is Nothing) Then
@@ -221,7 +221,7 @@ Namespace TestDomainServices
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Master() As AI_MasterDerived
Get
If (Me._master Is Nothing) Then
@@ -288,7 +288,7 @@ Namespace TestDomainServices
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Master() As AI_MasterDerived
Get
If (Me._master Is Nothing) Then
@@ -355,7 +355,7 @@ Namespace TestDomainServices
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Master() As AI_MasterDerived
Get
If (Me._master Is Nothing) Then
@@ -494,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
@@ -507,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
@@ -520,7 +520,7 @@ Namespace TestDomainServices
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property DetailDerived3() As AI_DetailDerived3
Get
If (Me._detailDerived3 Is Nothing) Then
@@ -548,7 +548,7 @@ Namespace TestDomainServices
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property DetailDerived4() As AI_DetailDerived4
Get
If (Me._detailDerived4 Is Nothing) Then
@@ -954,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,7 +1125,7 @@ Namespace TestDomainServices
''' Gets the collection of associated entity instances.
'''
_
+ EntityAssociation("Child_Parent", "ID", "ParentID")> _
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 a9f2faa9..83e0a085 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
@@ -74,9 +74,7 @@ public Child()
/// Gets the collection of associated entity instances.
///
[Composition()]
- [EntityAssociation("GrandChild_Child", new string[] {
- "ID"}, new string[] {
- "ParentID"})]
+ [EntityAssociation("GrandChild_Child", "ID", "ParentID")]
public EntityCollection Children
{
get
@@ -142,9 +140,7 @@ public string OperationResult
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Child_Parent", new string[] {
- "ParentID"}, new string[] {
- "ID"}, IsForeignKey=true)]
+ [EntityAssociation("Child_Parent", "ParentID", "ID", IsForeignKey=true)]
public Parent Parent
{
get
@@ -391,9 +387,7 @@ public int ID
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Parent_Child", new string[] {
- "ParentID"}, new string[] {
- "ID"}, IsForeignKey=true)]
+ [EntityAssociation("Parent_Child", "ParentID", "ID", IsForeignKey=true)]
public CompositionScenarios_Parent Parent
{
get
@@ -702,9 +696,7 @@ public string A
/// Gets the collection of associated entity instances.
///
[Composition()]
- [EntityAssociation("Parent_Child", new string[] {
- "ID"}, new string[] {
- "ParentID"})]
+ [EntityAssociation("Parent_Child", "ID", "ParentID")]
public EntityCollection Children
{
get
@@ -1059,9 +1051,7 @@ public GrandChild()
/// Gets or sets the associated entity.
///
[Composition()]
- [EntityAssociation("GreatGrandChild_GrandChild", new string[] {
- "ID"}, new string[] {
- "ParentID"})]
+ [EntityAssociation("GreatGrandChild_GrandChild", "ID", "ParentID")]
public GreatGrandChild Child
{
get
@@ -1146,9 +1136,7 @@ public string OperationResult
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("GrandChild_Child", new string[] {
- "ParentID"}, new string[] {
- "ID"}, IsForeignKey=true)]
+ [EntityAssociation("GrandChild_Child", "ParentID", "ID", IsForeignKey=true)]
public Child Parent
{
get
@@ -1391,9 +1379,7 @@ public string OperationResult
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("GreatGrandChild_GrandChild", new string[] {
- "ParentID"}, new string[] {
- "ID"}, IsForeignKey=true)]
+ [EntityAssociation("GreatGrandChild_GrandChild", "ParentID", "ID", IsForeignKey=true)]
public GrandChild Parent
{
get
@@ -1578,9 +1564,7 @@ public Parent()
/// Gets the collection of associated entity instances.
///
[Composition()]
- [EntityAssociation("Child_Parent", new string[] {
- "ID"}, new string[] {
- "ParentID"})]
+ [EntityAssociation("Child_Parent", "ID", "ParentID")]
public EntityCollection Children
{
get
@@ -1773,9 +1757,7 @@ public SelfReferencingComposition()
/// Gets or sets the associated entity.
///
[Composition()]
- [EntityAssociation("Ref_Assoc", new string[] {
- "ID"}, new string[] {
- "ParentID"})]
+ [EntityAssociation("Ref_Assoc", "ID", "ParentID")]
public SelfReferencingComposition Child
{
get
@@ -1836,9 +1818,7 @@ public int ID
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Ref_Assoc", new string[] {
- "ParentID"}, new string[] {
- "ID"}, IsForeignKey=true)]
+ [EntityAssociation("Ref_Assoc", "ParentID", "ID", IsForeignKey=true)]
public SelfReferencingComposition Parent
{
get
@@ -1993,9 +1973,7 @@ public SelfReferencingComposition_OneToMany()
/// Gets the collection of associated entity instances.
///
[Composition()]
- [EntityAssociation("SelfReferencingComposition_OneToMany", new string[] {
- "ID"}, new string[] {
- "ParentID"})]
+ [EntityAssociation("SelfReferencingComposition_OneToMany", "ID", "ParentID")]
public EntityCollection Children
{
get
@@ -2037,9 +2015,7 @@ public int ID
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("SelfReferencingComposition_OneToMany", new string[] {
- "ParentID"}, new string[] {
- "ID"}, IsForeignKey=true)]
+ [EntityAssociation("SelfReferencingComposition_OneToMany", "ParentID", "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 ace6976a..a7a0fb25 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
@@ -89,7 +89,7 @@ Namespace TestDomainServices
''' Gets the collection of associated entity instances.
'''
_
+ EntityAssociation("GrandChild_Child", "ID", "ParentID")> _
Public ReadOnly Property Children() As EntityCollection(Of GrandChild)
Get
If (Me._children Is Nothing) Then
@@ -145,7 +145,7 @@ Namespace TestDomainServices
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Parent() As Parent
Get
If (Me._parent Is Nothing) Then
@@ -365,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,7 +649,7 @@ Namespace TestDomainServices
''' Gets the collection of associated entity instances.
'''
_
+ EntityAssociation("Parent_Child", "ID", "ParentID")> _
Public ReadOnly Property Children() As EntityCollection(Of CompositionScenarios_Child)
Get
If (Me._children Is Nothing) Then
@@ -991,7 +991,7 @@ Namespace TestDomainServices
''' Gets or sets the associated entity.
'''
_
+ EntityAssociation("GreatGrandChild_GrandChild", "ID", "ParentID")> _
Public Property Child() As GreatGrandChild
Get
If (Me._child Is Nothing) Then
@@ -1062,7 +1062,7 @@ Namespace TestDomainServices
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Parent() As Child
Get
If (Me._parent Is Nothing) Then
@@ -1284,7 +1284,7 @@ Namespace TestDomainServices
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Parent() As GrandChild
Get
If (Me._parent Is Nothing) Then
@@ -1454,7 +1454,7 @@ Namespace TestDomainServices
''' Gets the collection of associated entity instances.
'''
_
+ EntityAssociation("Child_Parent", "ID", "ParentID")> _
Public ReadOnly Property Children() As EntityCollection(Of Child)
Get
If (Me._children Is Nothing) Then
@@ -1631,7 +1631,7 @@ Namespace TestDomainServices
''' Gets or sets the associated entity.
'''
_
+ EntityAssociation("Ref_Assoc", "ID", "ParentID")> _
Public Property Child() As SelfReferencingComposition
Get
If (Me._child Is Nothing) Then
@@ -1682,7 +1682,7 @@ Namespace TestDomainServices
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Parent() As SelfReferencingComposition
Get
If (Me._parent Is Nothing) Then
@@ -1824,7 +1824,7 @@ Namespace TestDomainServices
''' Gets the collection of associated entity instances.
'''
_
+ EntityAssociation("SelfReferencingComposition_OneToMany", "ID", "ParentID")> _
Public ReadOnly Property Children() As EntityCollection(Of SelfReferencingComposition_OneToMany)
Get
If (Me._children Is Nothing) Then
@@ -1860,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 ef2b7615..368c99b9 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
@@ -169,9 +169,7 @@ public byte[] Picture
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Category_Product", new string[] {
- "CategoryID"}, new string[] {
- "CategoryID"})]
+ [EntityAssociation("Category_Product", "CategoryID", "CategoryID")]
public EntityCollection Products
{
get
@@ -502,9 +500,7 @@ public string Fax
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Customer_Order", new string[] {
- "CustomerID"}, new string[] {
- "CustomerID"})]
+ [EntityAssociation("Customer_Order", "CustomerID", "CustomerID")]
public EntityCollection Orders
{
get
@@ -716,9 +712,7 @@ public Order()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Customer_Order", new string[] {
- "CustomerID"}, new string[] {
- "CustomerID"}, IsForeignKey=true)]
+ [EntityAssociation("Customer_Order", "CustomerID", "CustomerID", IsForeignKey=true)]
public Customer Customer
{
get
@@ -865,9 +859,7 @@ public Nullable Freight
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Order_Order_Detail", new string[] {
- "OrderID"}, new string[] {
- "OrderID"})]
+ [EntityAssociation("Order_Order_Detail", "OrderID", "OrderID")]
public EntityCollection Order_Details
{
get
@@ -1282,9 +1274,7 @@ public float Discount
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Order_Order_Detail", new string[] {
- "OrderID"}, new string[] {
- "OrderID"}, IsForeignKey=true)]
+ [EntityAssociation("Order_Order_Detail", "OrderID", "OrderID", IsForeignKey=true)]
public Order Order
{
get
@@ -1354,9 +1344,7 @@ public int OrderID
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Product_Order_Detail", new string[] {
- "ProductID"}, new string[] {
- "ProductID"}, IsForeignKey=true)]
+ [EntityAssociation("Product_Order_Detail", "ProductID", "ProductID", IsForeignKey=true)]
public Product Product
{
get
@@ -1582,9 +1570,7 @@ public Product()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Category_Product", new string[] {
- "CategoryID"}, new string[] {
- "CategoryID"}, IsForeignKey=true)]
+ [EntityAssociation("Category_Product", "CategoryID", "CategoryID", IsForeignKey=true)]
public Category Category
{
get
@@ -1704,9 +1690,7 @@ public bool Discontinued
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Product_Order_Detail", new string[] {
- "ProductID"}, new string[] {
- "ProductID"})]
+ [EntityAssociation("Product_Order_Detail", "ProductID", "ProductID")]
public EntityCollection Order_Details
{
get
@@ -2284,9 +2268,7 @@ public int RegionID
/// Gets the collection of associated entity instances.
///
[Composition()]
- [EntityAssociation("Region_Territory", new string[] {
- "RegionID"}, new string[] {
- "RegionID"})]
+ [EntityAssociation("Region_Territory", "RegionID", "RegionID")]
public EntityCollection Territories
{
get
@@ -2367,9 +2349,7 @@ public Territory()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Region_Territory", new string[] {
- "RegionID"}, new string[] {
- "RegionID"}, IsForeignKey=true)]
+ [EntityAssociation("Region_Territory", "RegionID", "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 c503c92f..8c052839 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
@@ -169,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
@@ -484,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
@@ -708,7 +708,7 @@ Namespace CodeFirstModels
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Customer() As Customer
Get
If (Me._customer Is Nothing) Then
@@ -829,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
@@ -1201,7 +1201,7 @@ Namespace CodeFirstModels
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Order() As Order
Get
If (Me._order Is Nothing) Then
@@ -1258,7 +1258,7 @@ Namespace CodeFirstModels
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Product() As Product
Get
If (Me._product Is Nothing) Then
@@ -1491,7 +1491,7 @@ Namespace CodeFirstModels
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Category() As Category
Get
If (Me._category Is Nothing) Then
@@ -1590,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,7 +2107,7 @@ Namespace CodeFirstModels
''' Gets the collection of associated entity instances.
'''
_
+ EntityAssociation("Region_Territory", "RegionID", "RegionID")> _
Public ReadOnly Property Territories() As EntityCollection(Of Territory)
Get
If (Me._territories Is Nothing) Then
@@ -2188,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 07944688..8a146682 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
@@ -169,9 +169,7 @@ public byte[] Picture
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Category_Product", new string[] {
- "CategoryID"}, new string[] {
- "CategoryID"})]
+ [EntityAssociation("Category_Product", "CategoryID", "CategoryID")]
public EntityCollection Products
{
get
@@ -503,9 +501,7 @@ public string Fax
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Customer_Order", new string[] {
- "CustomerID"}, new string[] {
- "CustomerID"})]
+ [EntityAssociation("Customer_Order", "CustomerID", "CustomerID")]
public EntityCollection Orders
{
get
@@ -717,9 +713,7 @@ public Order()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Customer_Order", new string[] {
- "CustomerID"}, new string[] {
- "CustomerID"}, IsForeignKey=true)]
+ [EntityAssociation("Customer_Order", "CustomerID", "CustomerID", IsForeignKey=true)]
public Customer Customer
{
get
@@ -866,9 +860,7 @@ public Nullable Freight
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Order_Order_Detail", new string[] {
- "OrderID"}, new string[] {
- "OrderID"})]
+ [EntityAssociation("Order_Order_Detail", "OrderID", "OrderID")]
public EntityCollection Order_Details
{
get
@@ -1283,9 +1275,7 @@ public float Discount
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Order_Order_Detail", new string[] {
- "OrderID"}, new string[] {
- "OrderID"}, IsForeignKey=true)]
+ [EntityAssociation("Order_Order_Detail", "OrderID", "OrderID", IsForeignKey=true)]
public Order Order
{
get
@@ -1355,9 +1345,7 @@ public int OrderID
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Product_Order_Detail", new string[] {
- "ProductID"}, new string[] {
- "ProductID"}, IsForeignKey=true)]
+ [EntityAssociation("Product_Order_Detail", "ProductID", "ProductID", IsForeignKey=true)]
public Product Product
{
get
@@ -1583,9 +1571,7 @@ public Product()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Category_Product", new string[] {
- "CategoryID"}, new string[] {
- "CategoryID"}, IsForeignKey=true)]
+ [EntityAssociation("Category_Product", "CategoryID", "CategoryID", IsForeignKey=true)]
public Category Category
{
get
@@ -1705,9 +1691,7 @@ public bool Discontinued
///
/// Gets the collection of associated entity instances.
///
- [EntityAssociation("Product_Order_Detail", new string[] {
- "ProductID"}, new string[] {
- "ProductID"})]
+ [EntityAssociation("Product_Order_Detail", "ProductID", "ProductID")]
public EntityCollection Order_Details
{
get
@@ -2286,9 +2270,7 @@ public int RegionID
/// Gets the collection of associated entity instances.
///
[Composition()]
- [EntityAssociation("Region_Territory", new string[] {
- "RegionID"}, new string[] {
- "RegionID"})]
+ [EntityAssociation("Region_Territory", "RegionID", "RegionID")]
public EntityCollection Territories
{
get
@@ -2369,9 +2351,7 @@ public Territory()
///
/// Gets or sets the associated entity.
///
- [EntityAssociation("Region_Territory", new string[] {
- "RegionID"}, new string[] {
- "RegionID"}, IsForeignKey=true)]
+ [EntityAssociation("Region_Territory", "RegionID", "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 13e048d7..8b25d4b3 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
@@ -169,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
@@ -485,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
@@ -709,7 +709,7 @@ Namespace EFCoreModels.Northwind
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Customer() As Customer
Get
If (Me._customer Is Nothing) Then
@@ -830,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
@@ -1202,7 +1202,7 @@ Namespace EFCoreModels.Northwind
'''
''' Gets or sets the associated entity.
'''
- _
+ _
Public Property Order() As Order
Get
If (Me._order Is Nothing) Then
@@ -1259,7 +1259,7 @@ Namespace EFCoreModels.Northwind
'''