From 8f7be4f862a135c285f61a0b9b75808274b4f624 Mon Sep 17 00:00:00 2001 From: circles-arrows <31648959+circles-arrows@users.noreply.github.com> Date: Mon, 26 Feb 2024 00:25:44 +0800 Subject: [PATCH] - Code generation fixes for virtual and abstract Entities - Added Inherits to IEntity - Bug fix: editing StaticData via DynamicEntity in an upgrade script failed --- Blueprint41/Blueprint41.csproj | 10 +- Blueprint41/Core/ExtensionMethods.cs | 2 +- .../DatastoreTemplates/Domain_Data_Entity.cs | 1793 ++++++++++++----- .../DatastoreTemplates/Domain_Data_Entity.tt | 210 +- .../Domain_Data_Entity_Abstract.cs | 822 +++++++- .../Domain_Data_Entity_Abstract.tt | 117 +- .../Domain_Data_Entity_Relation.cs | 546 +++-- .../Domain_Data_Entity_Relation.tt | 73 +- Blueprint41/IEntity.cs | 6 +- Blueprint41/Property.cs | 2 +- Blueprint41/Query/MiscResult.cs | 14 - 11 files changed, 2753 insertions(+), 842 deletions(-) diff --git a/Blueprint41/Blueprint41.csproj b/Blueprint41/Blueprint41.csproj index ca78fbcd..08cbf037 100644 --- a/Blueprint41/Blueprint41.csproj +++ b/Blueprint41/Blueprint41.csproj @@ -223,11 +223,6 @@ - - Domain_Data_Entity_Relation.tt - True - True - True True @@ -238,6 +233,11 @@ True Domain_Data_Entity_Abstract.tt + + True + True + Domain_Data_Entity_Relation.tt + True True diff --git a/Blueprint41/Core/ExtensionMethods.cs b/Blueprint41/Core/ExtensionMethods.cs index 2320a0b1..a5cfe6b1 100644 --- a/Blueprint41/Core/ExtensionMethods.cs +++ b/Blueprint41/Core/ExtensionMethods.cs @@ -270,7 +270,7 @@ public static TValue GetValue(this Dictionary dictio { if (dictionary.TryGetValue(key, out TValue value)) return value; - + return defaultValue; } public static TValue GetValue(this IDictionary dictionary, TKey key, TValue defaultValue = default!) diff --git a/Blueprint41/DatastoreTemplates/Domain_Data_Entity.cs b/Blueprint41/DatastoreTemplates/Domain_Data_Entity.cs index e27623b9..a03747a5 100644 --- a/Blueprint41/DatastoreTemplates/Domain_Data_Entity.cs +++ b/Blueprint41/DatastoreTemplates/Domain_Data_Entity.cs @@ -2094,7 +2094,7 @@ protected override void ValidateSave() #line default #line hidden - this.Write(").GetItems(from, till);\r\n }\r\n public void Set"); + this.Write(").GetItems(from, till);\r\n }\r\n //public void Set"); #line 634 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); @@ -2108,7 +2108,7 @@ protected override void ValidateSave() #line default #line hidden - this.Write(" value, DateTime? moment)\r\n {\r\n if (LazySet(Members."); + this.Write(" value, DateTime? moment)\r\n //{\r\n // if (LazySet(Members."); #line 636 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); @@ -2129,7 +2129,7 @@ protected override void ValidateSave() #line default #line hidden - this.Write(").GetItems(moment, null), value, moment))\r\n ((ILookupHelper<"); + this.Write(").GetItems(moment, null), value, moment))\r\n // ((ILookupHelper<"); #line 637 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.OuterReturnType)); @@ -2143,7 +2143,7 @@ protected override void ValidateSave() #line default #line hidden - this.Write(").SetItem(value, moment);\r\n }\r\n"); + this.Write(").SetItem(value, moment);\r\n //}\r\n"); #line 639 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" @@ -2586,37 +2586,88 @@ protected override void ValidateSave() #line default #line hidden this.Write("Relations = new Lazy(delegate()\r\n {\r\n return Transac" + - "tion.CompiledQuery\r\n .Match(node."); + "tion.CompiledQuery\r\n"); #line 748 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + if (!attr.Relationship.InEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); + + #line 752 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); #line default #line hidden this.Write(".Alias(out var inAlias).In."); - #line 748 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 752 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias(out var relAlias).Out."); - #line 748 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 752 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); #line default #line hidden - this.Write(".Alias(out var outAlias))\r\n .Where("); + this.Write(".Alias(out var outAlias))\r\n"); + + #line 753 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); + + #line 758 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var outAlias).Out."); + + #line 758 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias(out var relAlias).In."); - #line 749 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 758 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var inAlias))\r\n"); + + #line 759 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + + + #line default + #line hidden + this.Write(" .Where("); + + #line 762 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Direction.ToString().ToLowerInvariant())); #line default #line hidden this.Write("Alias."); - #line 749 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 762 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default @@ -2625,71 +2676,122 @@ protected override void ValidateSave() "operties(\"properties\"), inAlias.As(\"in\"), outAlias.As(\"out\"))\r\n ." + "Compile();\r\n });\r\n public List<"); - #line 753 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 766 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write("> "); - #line 753 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 766 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("Where(Func<"); - #line 753 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 766 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias, QueryCondition> expression)\r\n {\r\n var query = Transacti" + - "on.CompiledQuery\r\n .Match(node."); + "on.CompiledQuery\r\n"); + + #line 769 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + if (!attr.Relationship.InEntity.IsVirtual) + { + - #line 756 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line default + #line hidden + this.Write(" .Match(node."); + + #line 773 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); #line default #line hidden this.Write(".Alias(out var inAlias).In."); - #line 756 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 773 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias(out var relAlias).Out."); - #line 756 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 773 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); #line default #line hidden - this.Write(".Alias(out var outAlias))\r\n .Where("); + this.Write(".Alias(out var outAlias))\r\n"); + + #line 774 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); + + #line 779 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var outAlias).Out."); + + #line 779 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias(out var relAlias).In."); + + #line 779 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var inAlias))\r\n"); + + #line 780 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + + + #line default + #line hidden + this.Write(" .Where("); - #line 757 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 783 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Direction.ToString().ToLowerInvariant())); #line default #line hidden this.Write("Alias."); - #line 757 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 783 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(" == "); - #line 757 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 783 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(")\r\n .And(expression.Invoke(new "); - #line 758 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 784 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default @@ -2698,78 +2800,129 @@ protected override void ValidateSave() ".As(\"elementId\"), relAlias.Properties(\"properties\"), inAlias.As(\"in\"), outAlias." + "As(\"out\"))\r\n .Compile();\r\n\r\n return "); - #line 762 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 788 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Load(query);\r\n }\r\n public List<"); - #line 764 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 790 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write("> "); - #line 764 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 790 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("Where(Func<"); - #line 764 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 790 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias, QueryCondition[]> expression)\r\n {\r\n var query = Transac" + - "tion.CompiledQuery\r\n .Match(node."); + "tion.CompiledQuery\r\n"); + + #line 793 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + if (!attr.Relationship.InEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); - #line 767 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 797 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); #line default #line hidden this.Write(".Alias(out var inAlias).In."); - #line 767 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 797 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias(out var relAlias).Out."); - #line 767 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 797 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); #line default #line hidden - this.Write(".Alias(out var outAlias))\r\n .Where("); + this.Write(".Alias(out var outAlias))\r\n"); + + #line 798 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); + + #line 803 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var outAlias).Out."); + + #line 803 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias(out var relAlias).In."); + + #line 803 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var inAlias))\r\n"); + + #line 804 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + + + #line default + #line hidden + this.Write(" .Where("); - #line 768 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 807 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Direction.ToString().ToLowerInvariant())); #line default #line hidden this.Write("Alias."); - #line 768 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 807 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(" == "); - #line 768 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 807 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(")\r\n .And(expression.Invoke(new "); - #line 769 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 808 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default @@ -2778,42 +2931,42 @@ protected override void ValidateSave() ".As(\"elementId\"), relAlias.Properties(\"properties\"), inAlias.As(\"in\"), outAlias." + "As(\"out\"))\r\n .Compile();\r\n\r\n return "); - #line 773 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 812 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Load(query);\r\n }\r\n public List<"); - #line 775 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 814 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write("> "); - #line 775 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 814 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("Where("); - #line 775 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 814 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Properties.ToJsonNotation())); #line default #line hidden this.Write(")\r\n {\r\n return "); - #line 777 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 816 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("Where(delegate("); - #line 777 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 816 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default @@ -2821,7 +2974,7 @@ protected override void ValidateSave() this.Write(".Alias alias)\r\n {\r\n List conditions = n" + "ew List();\r\n\r\n"); - #line 781 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 820 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" foreach (var argument in attr.Relationship.Properties) { @@ -2833,28 +2986,28 @@ protected override void ValidateSave() #line hidden this.Write(" if ("); - #line 787 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 826 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".HasValue) conditions.Add(alias."); - #line 787 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 826 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(" == "); - #line 787 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 826 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".Value?.ToString());\r\n"); - #line 788 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 827 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } else @@ -2865,28 +3018,28 @@ protected override void ValidateSave() #line hidden this.Write(" if ("); - #line 793 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 832 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".HasValue) conditions.Add(alias."); - #line 793 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 832 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(" == "); - #line 793 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 832 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".Value);\r\n"); - #line 794 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 833 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } } @@ -2897,27 +3050,27 @@ protected override void ValidateSave() this.Write("\r\n return conditions.ToArray();\r\n });\r\n }\r\n " + " public void Add"); - #line 802 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 841 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name.ToSingular())); #line default #line hidden this.Write("("); - #line 802 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name)); + #line 841 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.ClassName)); #line default #line hidden this.Write(" "); - #line 802 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 841 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name.ToCamelCase())); #line default #line hidden - #line 802 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 841 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true))); #line default @@ -2925,7 +3078,7 @@ protected override void ValidateSave() this.Write(")\r\n {\r\n Dictionary properties = new Dictionary<" + "string, object>();\r\n"); - #line 805 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 844 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" foreach (var p in attr.Relationship.Properties.Where(item => item.Name != attr.Relationship.StartDate && item.Name != attr.Relationship.EndDate && item.Name != attr.Relationship.CreationDate)) { @@ -2937,28 +3090,28 @@ protected override void ValidateSave() #line hidden this.Write(" if ("); - #line 811 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 850 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Name)); #line default #line hidden this.Write(".HasValue) properties.Add(\""); - #line 811 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 850 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Name)); #line default #line hidden this.Write("\", "); - #line 811 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 850 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Name)); #line default #line hidden this.Write(".Value?.ToString());\r\n"); - #line 812 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 851 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } else @@ -2969,28 +3122,28 @@ protected override void ValidateSave() #line hidden this.Write(" if ("); - #line 817 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 856 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Name)); #line default #line hidden this.Write(".HasValue) properties.Add(\""); - #line 817 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 856 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Name)); #line default #line hidden this.Write("\", "); - #line 817 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 856 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Name)); #line default #line hidden this.Write(".Value);\r\n"); - #line 818 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 857 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } } @@ -3000,63 +3153,63 @@ protected override void ValidateSave() #line hidden this.Write(" ((ILookupHelper<"); - #line 822 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name)); + #line 861 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.ClassName)); #line default #line hidden this.Write(">)InnerData."); - #line 822 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 861 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(").AddItem("); - #line 822 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 861 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name.ToCamelCase())); #line default #line hidden this.Write(", null, properties);\r\n }\r\n public void Remove"); - #line 824 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 863 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name.ToSingular())); #line default #line hidden this.Write("("); - #line 824 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name)); + #line 863 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.ClassName)); #line default #line hidden this.Write(" "); - #line 824 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 863 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name.ToCamelCase())); #line default #line hidden this.Write(")\r\n {\r\n "); - #line 826 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 865 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(".Remove("); - #line 826 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 865 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name.ToCamelCase())); #line default #line hidden this.Write(");\r\n }\r\n\r\n #endregion\r\n"); - #line 830 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 869 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } else @@ -3072,85 +3225,136 @@ protected override void ValidateSave() #line hidden this.Write("\r\n #region "); - #line 841 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 880 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(" (Time Dependent Collection)\r\n\r\n public List<"); - #line 843 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 882 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write("> "); - #line 843 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 882 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name.ToSingular())); #line default #line hidden this.Write("Relations()\r\n {\r\n return "); - #line 845 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 884 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Load(_query"); - #line 845 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 884 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name.ToSingular())); #line default #line hidden this.Write("Relations.Value, (\"key\", "); - #line 845 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 884 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write("));\r\n }\r\n private readonly Lazy _query"); - #line 847 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 886 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name.ToSingular())); #line default #line hidden this.Write("Relations = new Lazy(delegate()\r\n {\r\n return Transac" + - "tion.CompiledQuery\r\n .Match(node."); + "tion.CompiledQuery\r\n"); - #line 850 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 889 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + if (!attr.Relationship.InEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); + + #line 893 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); #line default #line hidden this.Write(".Alias(out var inAlias).In."); - #line 850 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 893 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias(out var relAlias).Out."); - #line 850 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 893 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); #line default #line hidden - this.Write(".Alias(out var outAlias))\r\n .Where("); + this.Write(".Alias(out var outAlias))\r\n"); - #line 851 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 894 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); + + #line 899 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var outAlias).Out."); + + #line 899 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias(out var relAlias).In."); + + #line 899 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var inAlias))\r\n"); + + #line 900 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + + + #line default + #line hidden + this.Write(" .Where("); + + #line 903 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Direction.ToString().ToLowerInvariant())); #line default #line hidden this.Write("Alias."); - #line 851 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 903 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default @@ -3159,71 +3363,122 @@ protected override void ValidateSave() "operties(\"properties\"), inAlias.As(\"in\"), outAlias.As(\"out\"))\r\n ." + "Compile();\r\n });\r\n public List<"); - #line 855 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 907 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write("> "); - #line 855 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 907 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("Where(Func<"); - #line 855 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 907 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias, QueryCondition> expression)\r\n {\r\n var query = Transacti" + - "on.CompiledQuery\r\n .Match(node."); + "on.CompiledQuery\r\n"); + + #line 910 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + if (!attr.Relationship.InEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); - #line 858 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 914 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); #line default #line hidden this.Write(".Alias(out var inAlias).In."); - #line 858 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 914 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias(out var relAlias).Out."); - #line 858 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 914 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); #line default #line hidden - this.Write(".Alias(out var outAlias))\r\n .Where("); + this.Write(".Alias(out var outAlias))\r\n"); + + #line 915 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); + + #line 920 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var outAlias).Out."); + + #line 920 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias(out var relAlias).In."); + + #line 920 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var inAlias))\r\n"); + + #line 921 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + - #line 859 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line default + #line hidden + this.Write(" .Where("); + + #line 924 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Direction.ToString().ToLowerInvariant())); #line default #line hidden this.Write("Alias."); - #line 859 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 924 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(" == "); - #line 859 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 924 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(")\r\n .And(expression.Invoke(new "); - #line 860 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 925 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default @@ -3232,78 +3487,129 @@ protected override void ValidateSave() ".As(\"elementId\"), relAlias.Properties(\"properties\"), inAlias.As(\"in\"), outAlias." + "As(\"out\"))\r\n .Compile();\r\n\r\n return "); - #line 864 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 929 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Load(query);\r\n }\r\n public List<"); - #line 866 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 931 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write("> "); - #line 866 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 931 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("Where(Func<"); - #line 866 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 931 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias, QueryCondition[]> expression)\r\n {\r\n var query = Transac" + - "tion.CompiledQuery\r\n .Match(node."); + "tion.CompiledQuery\r\n"); - #line 869 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 934 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + if (!attr.Relationship.InEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); + + #line 938 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); #line default #line hidden this.Write(".Alias(out var inAlias).In."); - #line 869 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 938 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias(out var relAlias).Out."); - #line 869 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 938 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); #line default #line hidden - this.Write(".Alias(out var outAlias))\r\n .Where("); + this.Write(".Alias(out var outAlias))\r\n"); + + #line 939 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); + + #line 944 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var outAlias).Out."); + + #line 944 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias(out var relAlias).In."); - #line 870 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 944 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var inAlias))\r\n"); + + #line 945 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + + + #line default + #line hidden + this.Write(" .Where("); + + #line 948 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Direction.ToString().ToLowerInvariant())); #line default #line hidden this.Write("Alias."); - #line 870 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 948 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(" == "); - #line 870 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 948 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(")\r\n .And(expression.Invoke(new "); - #line 871 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 949 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default @@ -3312,42 +3618,42 @@ protected override void ValidateSave() ".As(\"elementId\"), relAlias.Properties(\"properties\"), inAlias.As(\"in\"), outAlias." + "As(\"out\"))\r\n .Compile();\r\n\r\n return "); - #line 875 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 953 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Load(query);\r\n }\r\n public List<"); - #line 877 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 955 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write("> "); - #line 877 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 955 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("Where(JsNotation Moment = default"); - #line 877 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 955 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true, true))); #line default #line hidden this.Write(")\r\n {\r\n return "); - #line 879 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 957 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("Where(delegate("); - #line 879 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 957 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default @@ -3355,7 +3661,7 @@ protected override void ValidateSave() this.Write(".Alias alias)\r\n {\r\n List conditions = n" + "ew List();\r\n\r\n"); - #line 883 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 961 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" foreach (var argument in attr.Relationship.Properties) { @@ -3370,28 +3676,28 @@ protected override void ValidateSave() #line hidden this.Write(" if ("); - #line 892 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 970 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".HasValue) conditions.Add(alias."); - #line 892 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 970 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(" == "); - #line 892 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 970 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".Value?.ToString());\r\n"); - #line 893 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 971 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } else @@ -3402,28 +3708,28 @@ protected override void ValidateSave() #line hidden this.Write(" if ("); - #line 898 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 976 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".HasValue) conditions.Add(alias."); - #line 898 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 976 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(" == "); - #line 898 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 976 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".Value);\r\n"); - #line 899 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 977 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } } @@ -3435,28 +3741,28 @@ protected override void ValidateSave() "e));\r\n\r\n return conditions.ToArray();\r\n });\r\n }" + "\r\n public void Add"); - #line 908 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 986 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name.ToSingular())); #line default #line hidden this.Write("("); - #line 908 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name)); + #line 986 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.ClassName)); #line default #line hidden this.Write(" "); - #line 908 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 986 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name.ToCamelCase())); #line default #line hidden this.Write(", DateTime? moment"); - #line 908 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 986 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true))); #line default @@ -3465,7 +3771,7 @@ protected override void ValidateSave() "UtcNow;\r\n\r\n Dictionary properties = new Dictionary();\r\n"); - #line 914 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 992 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" foreach (var p in attr.Relationship.Properties.Where(item => item.Name != attr.Relationship.StartDate && item.Name != attr.Relationship.EndDate && item.Name != attr.Relationship.CreationDate)) { @@ -3477,28 +3783,28 @@ protected override void ValidateSave() #line hidden this.Write(" if ("); - #line 920 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 998 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Name)); #line default #line hidden this.Write(".HasValue) properties.Add(\""); - #line 920 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 998 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Name)); #line default #line hidden this.Write("\", "); - #line 920 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 998 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Name)); #line default #line hidden this.Write(".Value?.ToString());\r\n"); - #line 921 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 999 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } else @@ -3509,28 +3815,28 @@ protected override void ValidateSave() #line hidden this.Write(" if ("); - #line 926 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1004 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Name)); #line default #line hidden this.Write(".HasValue) properties.Add(\""); - #line 926 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1004 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Name)); #line default #line hidden this.Write("\", "); - #line 926 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1004 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Name)); #line default #line hidden this.Write(".Value);\r\n"); - #line 927 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1005 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } } @@ -3540,63 +3846,63 @@ protected override void ValidateSave() #line hidden this.Write(" ((ILookupHelper<"); - #line 931 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name)); + #line 1009 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.ClassName)); #line default #line hidden this.Write(">)InnerData."); - #line 931 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1009 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(").AddItem("); - #line 931 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1009 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name.ToCamelCase())); #line default #line hidden this.Write(", moment, properties);\r\n }\r\n public void Remove"); - #line 933 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1011 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name.ToSingular())); #line default #line hidden this.Write("("); - #line 933 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name)); + #line 1011 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.ClassName)); #line default #line hidden this.Write(" "); - #line 933 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1011 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name.ToCamelCase())); #line default #line hidden this.Write(", DateTime? moment)\r\n {\r\n "); - #line 935 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1013 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(".Remove("); - #line 935 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1013 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name.ToCamelCase())); #line default #line hidden this.Write(", moment);\r\n }\r\n\r\n #endregion\r\n"); - #line 939 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1017 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } } @@ -3615,85 +3921,136 @@ protected override void ValidateSave() #line hidden this.Write("\r\n #region "); - #line 953 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1031 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(" (Lookup)\r\n\r\n public "); - #line 955 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1033 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(" "); - #line 955 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1033 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("Relation()\r\n {\r\n return "); - #line 957 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1035 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Load(_query"); - #line 957 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1035 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("Relation.Value, (\"key\", "); - #line 957 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1035 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(")).FirstOrDefault();\r\n }\r\n private readonly Lazy _query"); - #line 959 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1037 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("Relation = new Lazy(delegate()\r\n {\r\n return Transact" + - "ion.CompiledQuery\r\n .Match(node."); + "ion.CompiledQuery\r\n"); - #line 962 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1040 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + if (!attr.Relationship.InEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); + + #line 1044 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); #line default #line hidden this.Write(".Alias(out var inAlias).In."); - #line 962 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1044 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias(out var relAlias).Out."); - #line 962 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1044 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); #line default #line hidden - this.Write(".Alias(out var outAlias))\r\n .Where("); + this.Write(".Alias(out var outAlias))\r\n"); - #line 963 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1045 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); + + #line 1050 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var outAlias).Out."); + + #line 1050 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias(out var relAlias).In."); + + #line 1050 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var inAlias))\r\n"); + + #line 1051 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + + + #line default + #line hidden + this.Write(" .Where("); + + #line 1054 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Direction.ToString().ToLowerInvariant())); #line default #line hidden this.Write("Alias."); - #line 963 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1054 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default @@ -3702,71 +4059,122 @@ protected override void ValidateSave() "operties(\"properties\"), inAlias.As(\"in\"), outAlias.As(\"out\"))\r\n ." + "Compile();\r\n });\r\n public "); - #line 967 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1058 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(" Get"); - #line 967 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1058 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("If(Func<"); - #line 967 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1058 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias, QueryCondition> expression)\r\n {\r\n var query = Transacti" + - "on.CompiledQuery\r\n .Match(node."); + "on.CompiledQuery\r\n"); - #line 970 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1061 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + if (!attr.Relationship.InEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); + + #line 1065 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); #line default #line hidden this.Write(".Alias(out var inAlias).In."); - #line 970 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1065 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias(out var relAlias).Out."); - #line 970 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1065 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); #line default #line hidden - this.Write(".Alias(out var outAlias))\r\n .Where("); + this.Write(".Alias(out var outAlias))\r\n"); - #line 971 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1066 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); + + #line 1071 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var outAlias).Out."); + + #line 1071 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias(out var relAlias).In."); + + #line 1071 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var inAlias))\r\n"); + + #line 1072 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + + + #line default + #line hidden + this.Write(" .Where("); + + #line 1075 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Direction.ToString().ToLowerInvariant())); #line default #line hidden this.Write("Alias."); - #line 971 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1075 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(" == "); - #line 971 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1075 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(")\r\n .And(expression.Invoke(new "); - #line 972 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1076 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default @@ -3775,78 +4183,129 @@ protected override void ValidateSave() ".As(\"elementId\"), relAlias.Properties(\"properties\"), inAlias.As(\"in\"), outAlias." + "As(\"out\"))\r\n .Compile();\r\n\r\n return "); - #line 976 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1080 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Load(query).FirstOrDefault();\r\n }\r\n public "); - #line 978 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1082 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(" Get"); - #line 978 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1082 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("If(Func<"); - #line 978 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1082 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias, QueryCondition[]> expression)\r\n {\r\n var query = Transac" + - "tion.CompiledQuery\r\n .Match(node."); + "tion.CompiledQuery\r\n"); + + #line 1085 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + if (!attr.Relationship.InEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); - #line 981 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1089 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); #line default #line hidden this.Write(".Alias(out var inAlias).In."); - #line 981 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1089 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias(out var relAlias).Out."); - #line 981 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1089 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); #line default #line hidden - this.Write(".Alias(out var outAlias))\r\n .Where("); + this.Write(".Alias(out var outAlias))\r\n"); + + #line 1090 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); + + #line 1095 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var outAlias).Out."); + + #line 1095 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias(out var relAlias).In."); + + #line 1095 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var inAlias))\r\n"); + + #line 1096 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + - #line 982 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line default + #line hidden + this.Write(" .Where("); + + #line 1099 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Direction.ToString().ToLowerInvariant())); #line default #line hidden this.Write("Alias."); - #line 982 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1099 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(" == "); - #line 982 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1099 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(")\r\n .And(expression.Invoke(new "); - #line 983 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1100 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default @@ -3855,42 +4314,42 @@ protected override void ValidateSave() ".As(\"elementId\"), relAlias.Properties(\"properties\"), inAlias.As(\"in\"), outAlias." + "As(\"out\"))\r\n .Compile();\r\n\r\n return "); - #line 987 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1104 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Load(query).FirstOrDefault();\r\n }\r\n public "); - #line 989 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1106 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(" Get"); - #line 989 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1106 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("If("); - #line 989 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1106 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Properties.ToJsonNotation())); #line default #line hidden this.Write(")\r\n {\r\n return Get"); - #line 991 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1108 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("If(delegate("); - #line 991 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1108 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default @@ -3898,7 +4357,7 @@ protected override void ValidateSave() this.Write(".Alias alias)\r\n {\r\n List conditions = n" + "ew List();\r\n\r\n"); - #line 995 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1112 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" foreach (var argument in attr.Relationship.Properties) { @@ -3910,28 +4369,28 @@ protected override void ValidateSave() #line hidden this.Write(" if ("); - #line 1001 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1118 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".HasValue) conditions.Add(alias."); - #line 1001 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1118 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(" == "); - #line 1001 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1118 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".Value?.ToString());\r\n"); - #line 1002 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1119 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } else @@ -3942,28 +4401,28 @@ protected override void ValidateSave() #line hidden this.Write(" if ("); - #line 1007 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1124 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".HasValue) conditions.Add(alias."); - #line 1007 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1124 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(" == "); - #line 1007 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1124 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".Value);\r\n"); - #line 1008 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1125 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } } @@ -3974,27 +4433,27 @@ protected override void ValidateSave() this.Write("\r\n return conditions.ToArray();\r\n });\r\n }\r\n " + " public void Set"); - #line 1016 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1133 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("("); - #line 1016 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name)); + #line 1133 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.ClassName)); #line default #line hidden this.Write(" "); - #line 1016 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1133 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name.ToCamelCase())); #line default #line hidden - #line 1016 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1133 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true))); #line default @@ -4002,7 +4461,7 @@ protected override void ValidateSave() this.Write(")\r\n {\r\n Dictionary properties = new Dictionary<" + "string, object>();\r\n"); - #line 1019 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1136 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" foreach (var p in attr.Relationship.Properties.Where(item => item.Name != attr.Relationship.StartDate && item.Name != attr.Relationship.EndDate && item.Name != attr.Relationship.CreationDate)) { @@ -4014,28 +4473,28 @@ protected override void ValidateSave() #line hidden this.Write(" if ("); - #line 1025 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1142 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Name)); #line default #line hidden this.Write(".HasValue) properties.Add(\""); - #line 1025 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1142 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Name)); #line default #line hidden this.Write("\", "); - #line 1025 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1142 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Name)); #line default #line hidden this.Write(".Value?.ToString());\r\n"); - #line 1026 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1143 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } else @@ -4046,28 +4505,28 @@ protected override void ValidateSave() #line hidden this.Write(" if ("); - #line 1031 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1148 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Name)); #line default #line hidden this.Write(".HasValue) properties.Add(\""); - #line 1031 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1148 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Name)); #line default #line hidden this.Write("\", "); - #line 1031 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1148 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Name)); #line default #line hidden this.Write(".Value);\r\n"); - #line 1032 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1149 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } } @@ -4075,30 +4534,58 @@ protected override void ValidateSave() #line default #line hidden - this.Write("\r\n ((ILookupHelper<"); + this.Write("\r\n if (LazySet(Members."); - #line 1037 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(attr.OuterReturnType)); + #line 1154 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write(", ((ILookupHelper<"); + + #line 1154 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.ClassName)); #line default #line hidden this.Write(">)InnerData."); - #line 1037 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1154 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write(").GetItems(null, null), "); + + #line 1154 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name.ToCamelCase())); + + #line default + #line hidden + this.Write(", null))\r\n ((ILookupHelper<"); + + #line 1155 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.ClassName)); + + #line default + #line hidden + this.Write(">)InnerData."); + + #line 1155 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(").SetItem("); - #line 1037 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1155 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name.ToCamelCase())); #line default #line hidden - this.Write(", null, properties);\r\n\r\n }\r\n\r\n #endregion\r\n"); + this.Write(", null, properties);\r\n }\r\n\r\n #endregion\r\n"); - #line 1042 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1159 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } else @@ -4114,21 +4601,21 @@ protected override void ValidateSave() #line hidden this.Write("\r\n #region "); - #line 1053 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1170 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(" (Time Dependent Lookup)\r\n\r\n public "); - #line 1055 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1172 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(" "); - #line 1055 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1172 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default @@ -4136,21 +4623,21 @@ protected override void ValidateSave() this.Write("Relation(DateTime? moment = null)\r\n {\r\n if (moment is null)\r\n " + " moment = DateTime.UtcNow;\r\n\r\n return "); - #line 1060 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1177 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Load(_query"); - #line 1060 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1177 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("Relation.Value, (\"key\", "); - #line 1060 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1177 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default @@ -4158,43 +4645,94 @@ protected override void ValidateSave() this.Write("), (\"moment\", moment)).FirstOrDefault();\r\n }\r\n private readonly Laz" + "y _query"); - #line 1062 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1179 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("Relation = new Lazy(delegate()\r\n {\r\n return Transact" + - "ion.CompiledQuery\r\n .Match(node."); + "ion.CompiledQuery\r\n"); - #line 1065 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1182 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + if (!attr.Relationship.InEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); + + #line 1186 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); #line default #line hidden this.Write(".Alias(out var inAlias).In."); - #line 1065 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1186 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias(out var relAlias).Out."); - #line 1065 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1186 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); #line default #line hidden - this.Write(".Alias(out var outAlias))\r\n .Where("); + this.Write(".Alias(out var outAlias))\r\n"); - #line 1066 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1187 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); + + #line 1192 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var outAlias).Out."); + + #line 1192 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias(out var relAlias).In."); + + #line 1192 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var inAlias))\r\n"); + + #line 1193 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + + + #line default + #line hidden + this.Write(" .Where("); + + #line 1196 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Direction.ToString().ToLowerInvariant())); #line default #line hidden this.Write("Alias."); - #line 1066 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1196 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default @@ -4204,78 +4742,129 @@ protected override void ValidateSave() "s(\"in\"), outAlias.As(\"out\"))\r\n .Compile();\r\n });\r\n " + "public List<"); - #line 1071 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1201 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write("> "); - #line 1071 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1201 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("Relations()\r\n {\r\n return "); - #line 1073 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1203 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Load(_query"); - #line 1073 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + #line 1203 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("Relations.Value, (\"key\", "); + + #line 1203 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); + + #line default + #line hidden + this.Write("));\r\n }\r\n private readonly Lazy _query"); + + #line 1205 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("Relations = new Lazy(delegate()\r\n {\r\n return Transac" + + "tion.CompiledQuery\r\n"); + + #line 1208 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + if (!attr.Relationship.InEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); + + #line 1212 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var inAlias).In."); + + #line 1212 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias(out var relAlias).Out."); + + #line 1212 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); #line default #line hidden - this.Write("Relations.Value, (\"key\", "); + this.Write(".Alias(out var outAlias))\r\n"); - #line 1073 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); + #line 1213 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { + #line default #line hidden - this.Write("));\r\n }\r\n private readonly Lazy _query"); + this.Write(" .Match(node."); - #line 1075 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + #line 1218 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); #line default #line hidden - this.Write("Relations = new Lazy(delegate()\r\n {\r\n return Transac" + - "tion.CompiledQuery\r\n .Match(node."); + this.Write(".Alias(out var outAlias).Out."); - #line 1078 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); + #line 1218 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden - this.Write(".Alias(out var inAlias).In."); + this.Write(".Alias(out var relAlias).In."); - #line 1078 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + #line 1218 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); #line default #line hidden - this.Write(".Alias(out var relAlias).Out."); + this.Write(".Alias(out var inAlias))\r\n"); - #line 1078 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); + #line 1219 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + #line default #line hidden - this.Write(".Alias(out var outAlias))\r\n .Where("); + this.Write(" .Where("); - #line 1079 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1222 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Direction.ToString().ToLowerInvariant())); #line default #line hidden this.Write("Alias."); - #line 1079 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1222 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default @@ -4284,72 +4873,123 @@ protected override void ValidateSave() "operties(\"properties\"), inAlias.As(\"in\"), outAlias.As(\"out\"))\r\n ." + "Compile();\r\n });\r\n public "); - #line 1083 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1226 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(" Get"); - #line 1083 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1226 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("If(DateTime? moment, Func<"); - #line 1083 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1226 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias, QueryCondition> expression)\r\n {\r\n if (moment is null)\r\n" + " moment = DateTime.UtcNow;\r\n\r\n var query = Transaction" + - ".CompiledQuery\r\n .Match(node."); + ".CompiledQuery\r\n"); - #line 1089 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1232 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + if (!attr.Relationship.InEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); + + #line 1236 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); #line default #line hidden this.Write(".Alias(out var inAlias).In."); - #line 1089 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1236 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias(out var relAlias).Out."); - #line 1089 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1236 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); #line default #line hidden - this.Write(".Alias(out var outAlias))\r\n .Where("); + this.Write(".Alias(out var outAlias))\r\n"); - #line 1090 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1237 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); + + #line 1242 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var outAlias).Out."); + + #line 1242 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias(out var relAlias).In."); + + #line 1242 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var inAlias))\r\n"); + + #line 1243 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + + + #line default + #line hidden + this.Write(" .Where("); + + #line 1246 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Direction.ToString().ToLowerInvariant())); #line default #line hidden this.Write("Alias."); - #line 1090 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1246 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(" == "); - #line 1090 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1246 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(")\r\n .And(expression.Invoke(new "); - #line 1091 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1247 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default @@ -4361,79 +5001,130 @@ protected override void ValidateSave() return "); - #line 1096 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1252 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Load(query).FirstOrDefault();\r\n }\r\n public "); - #line 1098 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1254 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(" Get"); - #line 1098 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1254 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("If(DateTime? moment, Func<"); - #line 1098 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1254 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias, QueryCondition[]> expression)\r\n {\r\n if (moment is null)" + "\r\n moment = DateTime.UtcNow;\r\n\r\n var query = Transacti" + - "on.CompiledQuery\r\n .Match(node."); + "on.CompiledQuery\r\n"); - #line 1104 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1260 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + if (!attr.Relationship.InEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); + + #line 1264 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); #line default #line hidden this.Write(".Alias(out var inAlias).In."); - #line 1104 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1264 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias(out var relAlias).Out."); - #line 1104 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1264 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); #line default #line hidden - this.Write(".Alias(out var outAlias))\r\n .Where("); + this.Write(".Alias(out var outAlias))\r\n"); + + #line 1265 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { + + + #line default + #line hidden + this.Write(" .Match(node."); + + #line 1270 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); + + #line default + #line hidden + this.Write(".Alias(out var outAlias).Out."); + + #line 1270 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias(out var relAlias).In."); + + #line 1270 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); - #line 1105 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line default + #line hidden + this.Write(".Alias(out var inAlias))\r\n"); + + #line 1271 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + + } + + + #line default + #line hidden + this.Write(" .Where("); + + #line 1274 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Direction.ToString().ToLowerInvariant())); #line default #line hidden this.Write("Alias."); - #line 1105 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1274 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(" == "); - #line 1105 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1274 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(")\r\n .And(expression.Invoke(new "); - #line 1106 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1275 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default @@ -4445,42 +5136,42 @@ protected override void ValidateSave() return "); - #line 1111 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1280 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Load(query).FirstOrDefault();\r\n }\r\n public "); - #line 1113 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1282 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(" Get"); - #line 1113 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1282 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("If(DateTime? moment"); - #line 1113 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1282 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true, true))); #line default #line hidden this.Write(")\r\n {\r\n return Get"); - #line 1115 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1284 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("If(moment, delegate("); - #line 1115 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1284 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default @@ -4488,7 +5179,7 @@ protected override void ValidateSave() this.Write(".Alias alias)\r\n {\r\n List conditions = n" + "ew List();\r\n\r\n"); - #line 1119 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1288 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" foreach (var argument in attr.Relationship.Properties) { @@ -4503,28 +5194,28 @@ protected override void ValidateSave() #line hidden this.Write(" if ("); - #line 1128 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1297 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".HasValue) conditions.Add(alias."); - #line 1128 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1297 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(" == "); - #line 1128 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1297 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".Value?.ToString());\r\n"); - #line 1129 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1298 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } else @@ -4535,28 +5226,28 @@ protected override void ValidateSave() #line hidden this.Write(" if ("); - #line 1134 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1303 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".HasValue) conditions.Add(alias."); - #line 1134 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1303 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(" == "); - #line 1134 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1303 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".Value);\r\n"); - #line 1135 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1304 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } } @@ -4567,21 +5258,21 @@ protected override void ValidateSave() this.Write("\r\n return conditions.ToArray();\r\n });\r\n }\r\n " + " public List<"); - #line 1143 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1312 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write("> "); - #line 1143 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1312 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("Where(Func<"); - #line 1143 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1312 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default @@ -4589,49 +5280,49 @@ protected override void ValidateSave() this.Write(".Alias, QueryCondition> expression)\r\n {\r\n var query = Transacti" + "on.CompiledQuery\r\n .Match(node."); - #line 1146 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1315 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); #line default #line hidden this.Write(".Alias(out var inAlias).In."); - #line 1146 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1315 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias(out var relAlias).Out."); - #line 1146 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1315 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); #line default #line hidden this.Write(".Alias(out var outAlias))\r\n .Where("); - #line 1147 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1316 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Direction.ToString().ToLowerInvariant())); #line default #line hidden this.Write("Alias."); - #line 1147 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1316 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(" == "); - #line 1147 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1316 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(")\r\n .And(expression.Invoke(new "); - #line 1148 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1317 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default @@ -4640,28 +5331,28 @@ protected override void ValidateSave() ".As(\"elementId\"), relAlias.Properties(\"properties\"), inAlias.As(\"in\"), outAlias." + "As(\"out\"))\r\n .Compile();\r\n\r\n return "); - #line 1152 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1321 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Load(query);\r\n }\r\n public List<"); - #line 1154 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1323 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write("> "); - #line 1154 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1323 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("Where(Func<"); - #line 1154 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1323 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default @@ -4669,49 +5360,49 @@ protected override void ValidateSave() this.Write(".Alias, QueryCondition[]> expression)\r\n {\r\n var query = Transac" + "tion.CompiledQuery\r\n .Match(node."); - #line 1157 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1326 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.InEntity.Name)); #line default #line hidden this.Write(".Alias(out var inAlias).In."); - #line 1157 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1326 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Alias(out var relAlias).Out."); - #line 1157 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1326 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.OutEntity.Name)); #line default #line hidden this.Write(".Alias(out var outAlias))\r\n .Where("); - #line 1158 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1327 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Direction.ToString().ToLowerInvariant())); #line default #line hidden this.Write("Alias."); - #line 1158 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1327 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(" == "); - #line 1158 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1327 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(")\r\n .And(expression.Invoke(new "); - #line 1159 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1328 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default @@ -4720,42 +5411,42 @@ protected override void ValidateSave() ".As(\"elementId\"), relAlias.Properties(\"properties\"), inAlias.As(\"in\"), outAlias." + "As(\"out\"))\r\n .Compile();\r\n\r\n return "); - #line 1163 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1332 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write(".Load(query);\r\n }\r\n public List<"); - #line 1165 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1334 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default #line hidden this.Write("> "); - #line 1165 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1334 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("Where(JsNotation Moment = default"); - #line 1165 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1334 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true, true))); #line default #line hidden this.Write(")\r\n {\r\n return "); - #line 1167 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1336 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("Where(delegate("); - #line 1167 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1336 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); #line default @@ -4763,7 +5454,7 @@ protected override void ValidateSave() this.Write(".Alias alias)\r\n {\r\n List conditions = n" + "ew List();\r\n\r\n"); - #line 1171 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1340 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" foreach (var argument in attr.Relationship.Properties) { @@ -4778,28 +5469,28 @@ protected override void ValidateSave() #line hidden this.Write(" if ("); - #line 1180 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1349 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".HasValue) conditions.Add(alias."); - #line 1180 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1349 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(" == "); - #line 1180 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1349 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".Value?.ToString());\r\n"); - #line 1181 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1350 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } else @@ -4810,28 +5501,28 @@ protected override void ValidateSave() #line hidden this.Write(" if ("); - #line 1186 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1355 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".HasValue) conditions.Add(alias."); - #line 1186 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1355 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(" == "); - #line 1186 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1355 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".Value);\r\n"); - #line 1187 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1356 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } } @@ -4843,28 +5534,28 @@ protected override void ValidateSave() "e));\r\n\r\n return conditions.ToArray();\r\n });\r\n }" + "\r\n public void Set"); - #line 1196 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1365 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("("); - #line 1196 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name)); + #line 1365 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.ClassName)); #line default #line hidden this.Write(" "); - #line 1196 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1365 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name.ToCamelCase())); #line default #line hidden this.Write(", DateTime? moment"); - #line 1196 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1365 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true))); #line default @@ -4873,7 +5564,7 @@ protected override void ValidateSave() "UtcNow;\r\n\r\n Dictionary properties = new Dictionary();\r\n"); - #line 1202 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1371 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" foreach (var argument in attr.Relationship.Properties.Where(item => item.Name != attr.Relationship.StartDate && item.Name != attr.Relationship.EndDate && item.Name != attr.Relationship.CreationDate)) { @@ -4885,28 +5576,28 @@ protected override void ValidateSave() #line hidden this.Write(" if ("); - #line 1208 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1377 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".HasValue) properties.Add(\""); - #line 1208 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1377 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write("\", "); - #line 1208 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1377 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".Value?.ToString());\r\n"); - #line 1209 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1378 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } else @@ -4917,28 +5608,28 @@ protected override void ValidateSave() #line hidden this.Write(" if ("); - #line 1214 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1383 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".HasValue) properties.Add(\""); - #line 1214 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1383 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write("\", "); - #line 1214 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1383 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(argument.Name)); #line default #line hidden this.Write(".Value);\r\n"); - #line 1215 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1384 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } } @@ -4946,30 +5637,58 @@ protected override void ValidateSave() #line default #line hidden - this.Write("\r\n ((ILookupHelper<"); + this.Write("\r\n if (LazySet(Members."); - #line 1220 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(attr.OuterReturnType)); + #line 1389 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write(", ((ILookupHelper<"); + + #line 1389 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.ClassName)); + + #line default + #line hidden + this.Write(">)InnerData."); + + #line 1389 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write(").GetItems(moment, null), "); + + #line 1389 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name.ToCamelCase())); + + #line default + #line hidden + this.Write(", moment))\r\n ((ILookupHelper<"); + + #line 1390 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.ClassName)); #line default #line hidden this.Write(">)InnerData."); - #line 1220 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1390 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(").SetItem("); - #line 1220 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1390 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name.ToCamelCase())); #line default #line hidden this.Write(", moment, properties);\r\n }\r\n\r\n #endregion\r\n"); - #line 1224 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1394 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } } @@ -4980,7 +5699,7 @@ protected override void ValidateSave() #line hidden this.Write("\r\n private static readonly Parameter key = Parameter.New<"); - #line 1230 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1400 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.GetPropertiesOfBaseTypesAndSelf().First(item => item.IsKey).SystemReturnType.ToCSharp())); #line default @@ -4988,7 +5707,7 @@ protected override void ValidateSave() this.Write(">(\"key\");\r\n private static readonly Parameter moment = Parameter.New(\"moment\");\r\n\r\n"); - #line 1233 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1403 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" /******************************************************************************************* *** *** @@ -5001,14 +5720,14 @@ protected override void ValidateSave() #line hidden this.Write(" #endregion\r\n\r\n #region Reflection\r\n\r\n private static "); - #line 1244 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1414 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default #line hidden this.Write("Members members = null;\r\n public static "); - #line 1245 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1415 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default @@ -5016,7 +5735,7 @@ protected override void ValidateSave() this.Write("Members Members\r\n {\r\n get\r\n {\r\n if (m" + "embers is null)\r\n {\r\n lock (typeof("); - #line 1251 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1421 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default @@ -5024,7 +5743,7 @@ protected override void ValidateSave() this.Write("))\r\n {\r\n if (members is null)\r\n " + " members = new "); - #line 1254 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1424 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default @@ -5032,21 +5751,21 @@ protected override void ValidateSave() this.Write("Members();\r\n }\r\n }\r\n return memb" + "ers;\r\n }\r\n }\r\n public class "); - #line 1260 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1430 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default #line hidden this.Write("Members\r\n {\r\n internal "); - #line 1262 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1432 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default #line hidden this.Write("Members() { }\r\n\r\n"); - #line 1264 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1434 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" foreach (Entity inherited in DALModel.GetBaseTypesAndSelf()) { @@ -5056,52 +5775,52 @@ protected override void ValidateSave() #line hidden this.Write(" #region Members for interface I"); - #line 1268 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1438 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(inherited.Name)); #line default #line hidden this.Write("\r\n\r\n"); - #line 1270 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1440 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" - foreach (Property attr in inherited.Properties) + foreach (EntityProperty attr in inherited.Properties) { #line default #line hidden - this.Write(" public Property "); + this.Write(" public EntityProperty "); - #line 1274 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1444 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(" { get; } = "); - #line 1274 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1444 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Datastore.GetType().FullName.Replace("+", "."))); #line default #line hidden this.Write(".Model.Entities[\""); - #line 1274 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1444 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(inherited.Name)); #line default #line hidden this.Write("\"].Properties[\""); - #line 1274 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1444 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("\"];\r\n"); - #line 1275 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1445 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } @@ -5110,7 +5829,7 @@ protected override void ValidateSave() #line hidden this.Write(" #endregion\r\n\r\n"); - #line 1280 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1450 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } @@ -5119,14 +5838,14 @@ protected override void ValidateSave() #line hidden this.Write(" }\r\n\r\n private static "); - #line 1285 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1455 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default #line hidden this.Write("FullTextMembers fullTextMembers = null;\r\n public static "); - #line 1286 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1456 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default @@ -5135,7 +5854,7 @@ protected override void ValidateSave() " if (fullTextMembers is null)\r\n {\r\n " + "lock (typeof("); - #line 1292 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1462 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default @@ -5143,7 +5862,7 @@ protected override void ValidateSave() this.Write("))\r\n {\r\n if (fullTextMembers is null)\r\n" + " fullTextMembers = new "); - #line 1295 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1465 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default @@ -5151,59 +5870,59 @@ protected override void ValidateSave() this.Write("FullTextMembers();\r\n }\r\n }\r\n ret" + "urn fullTextMembers;\r\n }\r\n }\r\n\r\n public class "); - #line 1302 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1472 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default #line hidden this.Write("FullTextMembers\r\n {\r\n internal "); - #line 1304 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1474 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default #line hidden this.Write("FullTextMembers() { }\r\n\r\n"); - #line 1306 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1476 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" - foreach (Property attr in DALModel.FullTextIndexProperties) + foreach (EntityProperty attr in DALModel.FullTextIndexProperties) { #line default #line hidden - this.Write(" public Property "); + this.Write(" public EntityProperty "); - #line 1310 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1480 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(" { get; } = "); - #line 1310 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1480 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Datastore.GetType().FullName.Replace("+", "."))); #line default #line hidden this.Write(".Model.Entities[\""); - #line 1310 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1480 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Parent.Name)); #line default #line hidden this.Write("\"].Properties[\""); - #line 1310 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1480 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("\"];\r\n"); - #line 1311 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1481 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } @@ -5213,7 +5932,7 @@ protected override void ValidateSave() this.Write(" }\r\n\r\n sealed public override Entity GetEntity()\r\n {\r\n " + " if (entity is null)\r\n {\r\n lock (typeof("); - #line 1320 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1490 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default @@ -5221,14 +5940,14 @@ protected override void ValidateSave() this.Write("))\r\n {\r\n if (entity is null)\r\n " + " entity = "); - #line 1323 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1493 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Datastore.GetType().FullName.Replace("+", "."))); #line default #line hidden this.Write(".Model.Entities[\""); - #line 1323 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1493 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Name)); #line default @@ -5236,14 +5955,14 @@ protected override void ValidateSave() this.Write("\"];\r\n }\r\n }\r\n return entity;\r\n }\r\n\r\n " + " private static "); - #line 1329 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1499 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Name)); #line default #line hidden this.Write("Events events = null;\r\n public static "); - #line 1330 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1500 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Name)); #line default @@ -5251,7 +5970,7 @@ protected override void ValidateSave() this.Write("Events Events\r\n {\r\n get\r\n {\r\n if (eve" + "nts is null)\r\n {\r\n lock (typeof("); - #line 1336 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1506 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default @@ -5259,7 +5978,7 @@ protected override void ValidateSave() this.Write("))\r\n {\r\n if (events is null)\r\n " + " events = new "); - #line 1339 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1509 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default @@ -5267,14 +5986,14 @@ protected override void ValidateSave() this.Write("Events();\r\n }\r\n }\r\n return event" + "s;\r\n }\r\n }\r\n public class "); - #line 1345 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1515 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Name)); #line default #line hidden this.Write("Events\r\n {\r\n"); - #line 1347 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1517 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" List events = new List(); events.Add("OnNew"); @@ -5290,42 +6009,42 @@ protected override void ValidateSave() #line hidden this.Write("\r\n #region "); - #line 1358 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1528 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt)); #line default #line hidden this.Write("\r\n\r\n private bool "); - #line 1360 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1530 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default #line hidden this.Write("IsRegistered = false;\r\n\r\n private EventHandler<"); - #line 1362 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1532 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default #line hidden this.Write(", EntityEventArgs> "); - #line 1362 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1532 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default #line hidden this.Write(";\r\n public event EventHandler<"); - #line 1363 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1533 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default #line hidden this.Write(", EntityEventArgs> "); - #line 1363 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1533 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt)); #line default @@ -5333,7 +6052,7 @@ protected override void ValidateSave() this.Write("\r\n {\r\n add\r\n {\r\n lock" + " (this)\r\n {\r\n if (!"); - #line 1369 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1539 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default @@ -5341,42 +6060,42 @@ protected override void ValidateSave() this.Write("IsRegistered)\r\n {\r\n Entity.Even" + "ts."); - #line 1371 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1541 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt)); #line default #line hidden this.Write(" -= "); - #line 1371 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1541 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default #line hidden this.Write("Proxy;\r\n Entity.Events."); - #line 1372 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1542 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt)); #line default #line hidden this.Write(" += "); - #line 1372 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1542 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default #line hidden this.Write("Proxy;\r\n "); - #line 1373 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1543 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default #line hidden this.Write("IsRegistered = true;\r\n }\r\n "); - #line 1375 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1545 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default @@ -5385,21 +6104,21 @@ protected override void ValidateSave() " {\r\n lock (this)\r\n {\r\n " + " "); - #line 1382 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1552 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default #line hidden this.Write(" -= value;\r\n if ("); - #line 1383 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1553 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default #line hidden this.Write(" is null && "); - #line 1383 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1553 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default @@ -5407,21 +6126,21 @@ protected override void ValidateSave() this.Write("IsRegistered)\r\n {\r\n Entity.Even" + "ts."); - #line 1385 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1555 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt)); #line default #line hidden this.Write(" -= "); - #line 1385 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1555 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default #line hidden this.Write("Proxy;\r\n "); - #line 1386 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1556 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default @@ -5429,7 +6148,7 @@ protected override void ValidateSave() this.Write("IsRegistered = false;\r\n }\r\n }\r\n " + " }\r\n }\r\n \r\n private void "); - #line 1392 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1562 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default @@ -5437,14 +6156,14 @@ protected override void ValidateSave() this.Write("Proxy(object sender, EntityEventArgs args)\r\n {\r\n EventH" + "andler<"); - #line 1394 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1564 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default #line hidden this.Write(", EntityEventArgs> handler = "); - #line 1394 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1564 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default @@ -5452,14 +6171,14 @@ protected override void ValidateSave() this.Write(";\r\n if (handler is not null)\r\n handler.Invoke((" + ""); - #line 1396 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1566 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default #line hidden this.Write(")sender, args);\r\n }\r\n\r\n #endregion\r\n"); - #line 1400 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1570 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } @@ -5469,7 +6188,7 @@ protected override void ValidateSave() this.Write("\r\n #region OnPropertyChange\r\n\r\n public static class OnPrope" + "rtyChange\r\n {\r\n\r\n"); - #line 1409 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1579 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" foreach (Entity inherited in DALModel.GetBaseTypesAndSelf()) { @@ -5482,42 +6201,42 @@ protected override void ValidateSave() #line hidden this.Write(" #region "); - #line 1416 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1586 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt)); #line default #line hidden this.Write("\r\n\r\n private static bool "); - #line 1418 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1588 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default #line hidden this.Write("IsRegistered = false;\r\n\r\n private static EventHandler<"); - #line 1420 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1590 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default #line hidden this.Write(", PropertyEventArgs> "); - #line 1420 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1590 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default #line hidden this.Write(";\r\n public static event EventHandler<"); - #line 1421 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1591 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default #line hidden this.Write(", PropertyEventArgs> "); - #line 1421 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1591 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt)); #line default @@ -5526,7 +6245,7 @@ protected override void ValidateSave() " lock (typeof(OnPropertyChange))\r\n {\r\n " + " if (!"); - #line 1427 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1597 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default @@ -5534,35 +6253,35 @@ protected override void ValidateSave() this.Write("IsRegistered)\r\n {\r\n Mem" + "bers."); - #line 1429 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1599 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(".Events.OnChange -= "); - #line 1429 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1599 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default #line hidden this.Write("Proxy;\r\n Members."); - #line 1430 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1600 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(".Events.OnChange += "); - #line 1430 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1600 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default #line hidden this.Write("Proxy;\r\n "); - #line 1431 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1601 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default @@ -5570,7 +6289,7 @@ protected override void ValidateSave() this.Write("IsRegistered = true;\r\n }\r\n " + ""); - #line 1433 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1603 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default @@ -5579,21 +6298,21 @@ protected override void ValidateSave() " remove\r\n {\r\n lock (typeof(OnPropertyC" + "hange))\r\n {\r\n "); - #line 1440 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1610 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default #line hidden this.Write(" -= value;\r\n if ("); - #line 1441 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1611 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default #line hidden this.Write(" is null && "); - #line 1441 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1611 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default @@ -5601,21 +6320,21 @@ protected override void ValidateSave() this.Write("IsRegistered)\r\n {\r\n Mem" + "bers."); - #line 1443 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1613 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(".Events.OnChange -= "); - #line 1443 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1613 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default #line hidden this.Write("Proxy;\r\n "); - #line 1444 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1614 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default @@ -5624,7 +6343,7 @@ protected override void ValidateSave() " }\r\n }\r\n \r\n private " + "static void "); - #line 1450 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1620 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default @@ -5632,14 +6351,14 @@ protected override void ValidateSave() this.Write("Proxy(object sender, PropertyEventArgs args)\r\n {\r\n " + " EventHandler<"); - #line 1452 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1622 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default #line hidden this.Write(", PropertyEventArgs> handler = "); - #line 1452 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1622 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(evnt.ToCamelCase())); #line default @@ -5647,14 +6366,14 @@ protected override void ValidateSave() this.Write(";\r\n if (handler is not null)\r\n handler." + "Invoke(("); - #line 1454 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1624 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default #line hidden this.Write(")sender, args);\r\n }\r\n\r\n #endregion\r\n\r\n"); - #line 1459 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1629 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } } @@ -5664,7 +6383,7 @@ protected override void ValidateSave() #line hidden this.Write(" }\r\n\r\n #endregion\r\n }\r\n\r\n #endregion\r\n"); - #line 1469 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1639 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" var enumProperties = DALModel.Properties.Where(item => item.EnumValues is not null).ToList(); @@ -5676,7 +6395,7 @@ protected override void ValidateSave() #line hidden this.Write("\r\n #region Enumerations\r\n\r\n"); - #line 1478 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1648 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" foreach (Property attr in enumProperties) { @@ -5688,14 +6407,14 @@ protected override void ValidateSave() #line hidden this.Write(" public enum "); - #line 1484 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1654 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("Enum\r\n {\r\n"); - #line 1486 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1656 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" foreach (var value in attr.EnumValues) { @@ -5705,21 +6424,21 @@ protected override void ValidateSave() #line hidden this.Write(" "); - #line 1490 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1660 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(value.Name)); #line default #line hidden this.Write(" = "); - #line 1490 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1660 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(value.Value)); #line default #line hidden this.Write(",\r\n"); - #line 1491 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1661 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } @@ -5728,7 +6447,7 @@ protected override void ValidateSave() #line hidden this.Write(" }\r\n\r\n"); - #line 1496 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1666 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } @@ -5737,7 +6456,7 @@ protected override void ValidateSave() #line hidden this.Write(" #endregion\r\n"); - #line 1500 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1670 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } @@ -5750,7 +6469,7 @@ protected override void ValidateSave() this.Write("\r\n #region Static Data\r\n\r\n public static class StaticData\r\n " + "{\r\n"); - #line 1511 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1681 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" foreach (Property property in DALModel.GetPropertiesOfBaseTypesAndSelf().OrderBy(item => item.Name)) { @@ -5772,21 +6491,21 @@ protected override void ValidateSave() this.Write(" /// \r\n /// Get the \'Key\' value for the correspond" + "ing "); - #line 1527 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1697 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name)); #line default #line hidden this.Write("\r\n /// \r\n public static class "); - #line 1529 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1699 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name)); #line default #line hidden this.Write("\r\n {\r\n"); - #line 1531 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1701 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" foreach (TypeSafeStaticData value in values) { @@ -5796,28 +6515,28 @@ protected override void ValidateSave() #line hidden this.Write(" public const "); - #line 1535 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1705 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.OuterReturnTypeReadOnly)); #line default #line hidden this.Write(" "); - #line 1535 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1705 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(value.SafeValue)); #line default #line hidden this.Write(" = "); - #line 1535 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1705 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(EmitConstantValue(value.KeyValue, DALModel.Key.SystemReturnType))); #line default #line hidden this.Write(";\r\n"); - #line 1536 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1706 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } @@ -5826,14 +6545,14 @@ protected override void ValidateSave() #line hidden this.Write(" public static bool Exist(string "); - #line 1539 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1709 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name.ToCamelCase())); #line default #line hidden this.Write(")\r\n {\r\n"); - #line 1541 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1711 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" foreach (TypeSafeStaticData value in values) { @@ -5843,21 +6562,21 @@ protected override void ValidateSave() #line hidden this.Write(" if ("); - #line 1545 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1715 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(property.Name.ToCamelCase())); #line default #line hidden this.Write(" == \""); - #line 1545 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1715 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(value.OriginalValue.Replace("\"", "\\\""))); #line default #line hidden this.Write("\")\r\n return true;\r\n"); - #line 1547 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1717 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } @@ -5866,7 +6585,7 @@ protected override void ValidateSave() #line hidden this.Write(" return false;\r\n }\r\n }\r\n"); - #line 1553 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1723 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } @@ -5875,7 +6594,7 @@ protected override void ValidateSave() #line hidden this.Write(" }\r\n\r\n #endregion\r\n"); - #line 1559 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1729 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } @@ -5884,21 +6603,21 @@ protected override void ValidateSave() #line hidden this.Write("\r\n #region I"); - #line 1563 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1733 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Name)); #line default #line hidden this.Write("OriginalData\r\n\r\n public I"); - #line 1565 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1735 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Name)); #line default #line hidden this.Write("OriginalData OriginalVersion { get { return this; } }\r\n\r\n"); - #line 1567 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1737 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" foreach (Entity inherited in DALModel.GetBaseTypesAndSelf()) { @@ -5908,14 +6627,14 @@ protected override void ValidateSave() #line hidden this.Write(" #region Members for interface I"); - #line 1571 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1741 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(inherited.Name)); #line default #line hidden this.Write("\r\n"); - #line 1572 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1742 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" if (inherited.IsAbstract) { @@ -5925,21 +6644,21 @@ protected override void ValidateSave() #line hidden this.Write("\r\n I"); - #line 1577 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1747 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(inherited.Name)); #line default #line hidden this.Write("OriginalData "); - #line 1577 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1747 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(inherited.ClassName)); #line default #line hidden this.Write(".OriginalVersion { get { return this; } }\r\n"); - #line 1578 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1748 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } @@ -5948,7 +6667,7 @@ protected override void ValidateSave() #line hidden this.Write("\r\n"); - #line 1582 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1752 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" foreach (Property attr in inherited.Properties) { @@ -5960,35 +6679,35 @@ protected override void ValidateSave() #line hidden this.Write(" "); - #line 1588 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1758 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.OuterReturnTypeReadOnly)); #line default #line hidden this.Write(" I"); - #line 1588 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1758 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(inherited.Name)); #line default #line hidden this.Write("OriginalData."); - #line 1588 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1758 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(" { get { return OriginalData."); - #line 1588 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1758 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(".OriginalData; } }\r\n"); - #line 1589 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1759 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" if (attr.EntityReturnType is not null && attr.EntityReturnType.IsAbstract) { @@ -6001,56 +6720,56 @@ protected override void ValidateSave() #line hidden this.Write(" "); - #line 1596 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1766 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(concreteOuterType)); #line default #line hidden this.Write(" I"); - #line 1596 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1766 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(inherited.Name)); #line default #line hidden this.Write("OriginalData."); - #line 1596 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1766 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("_"); - #line 1596 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1766 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(concrete.Name)); #line default #line hidden this.Write(" { get { return OriginalData."); - #line 1596 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1766 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(".OriginalData.Where(item => item is "); - #line 1596 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1766 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(concrete.ClassName)); #line default #line hidden this.Write(").Select(item => item as "); - #line 1596 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1766 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(concrete.ClassName)); #line default #line hidden this.Write("); } }\r\n"); - #line 1597 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1767 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } } @@ -6065,42 +6784,42 @@ protected override void ValidateSave() #line hidden this.Write(" "); - #line 1606 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1776 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.OuterReturnTypeReadOnly)); #line default #line hidden this.Write(" I"); - #line 1606 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1776 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(inherited.Name)); #line default #line hidden this.Write("OriginalData."); - #line 1606 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1776 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(" { get { return ((ILookupHelper<"); - #line 1606 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1776 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.OuterReturnTypeReadOnly)); #line default #line hidden this.Write(">)OriginalData."); - #line 1606 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1776 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(").GetOriginalItem(DateTime.UtcNow); } }\r\n"); - #line 1607 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1777 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } else @@ -6111,42 +6830,42 @@ protected override void ValidateSave() #line hidden this.Write(" "); - #line 1612 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1782 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.OuterReturnTypeReadOnly)); #line default #line hidden this.Write(" I"); - #line 1612 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1782 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(inherited.Name)); #line default #line hidden this.Write("OriginalData."); - #line 1612 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1782 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(" { get { return ((ILookupHelper<"); - #line 1612 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1782 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.OuterReturnTypeReadOnly)); #line default #line hidden this.Write(">)OriginalData."); - #line 1612 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1782 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(").GetOriginalItem(null); } }\r\n"); - #line 1613 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1783 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } } @@ -6162,49 +6881,49 @@ protected override void ValidateSave() #line hidden this.Write(" "); - #line 1623 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1793 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.OuterReturnTypeReadOnly)); #line default #line hidden this.Write(" I"); - #line 1623 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1793 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(inherited.Name)); #line default #line hidden this.Write("OriginalData."); - #line 1623 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1793 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(" { get { return Parse<"); - #line 1623 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1793 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Parent.Name)); #line default #line hidden this.Write("."); - #line 1623 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1793 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("Enum>(OriginalData."); - #line 1623 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1793 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("); } }\r\n"); - #line 1624 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1794 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } else @@ -6215,49 +6934,49 @@ protected override void ValidateSave() #line hidden this.Write(" "); - #line 1629 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1799 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.OuterReturnTypeReadOnly)); #line default #line hidden this.Write(" I"); - #line 1629 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1799 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(inherited.Name)); #line default #line hidden this.Write("OriginalData."); - #line 1629 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1799 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(" { get { return Parse<"); - #line 1629 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1799 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Parent.Name)); #line default #line hidden this.Write("."); - #line 1629 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1799 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("Enum>(OriginalData."); - #line 1629 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1799 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(") ?? default; } }\r\n"); - #line 1630 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1800 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } } @@ -6269,35 +6988,35 @@ protected override void ValidateSave() #line hidden this.Write(" "); - #line 1636 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1806 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.OuterReturnTypeReadOnly)); #line default #line hidden this.Write(" I"); - #line 1636 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1806 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(inherited.Name)); #line default #line hidden this.Write("OriginalData."); - #line 1636 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1806 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(" { get { return OriginalData."); - #line 1636 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1806 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("; } }\r\n"); - #line 1637 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1807 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } } @@ -6308,7 +7027,7 @@ protected override void ValidateSave() #line hidden this.Write("\r\n #endregion\r\n"); - #line 1644 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1814 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } @@ -6317,7 +7036,7 @@ protected override void ValidateSave() #line hidden this.Write(" #endregion\r\n"); - #line 1648 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1818 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" if (inheritedUnidentifiedProp is not null) { @@ -6328,21 +7047,21 @@ protected override void ValidateSave() this.Write(" \r\n #region Member for UnidentifiedProperties\r\n\r\n IDictionar" + "y I"); - #line 1655 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1825 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(inheritedUnidentifiedProp.Name)); #line default #line hidden this.Write("OriginalData."); - #line 1655 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1825 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(inheritedUnidentifiedProp.UnidentifiedProperties)); #line default #line hidden this.Write(" { get { return OriginalData.UnidentifiedProperties; } }\r\n\r\n #endregion\r\n"); - #line 1658 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1828 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } @@ -6351,7 +7070,7 @@ protected override void ValidateSave() #line hidden this.Write(" }\r\n"); - #line 1662 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" + #line 1832 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity.tt" } diff --git a/Blueprint41/DatastoreTemplates/Domain_Data_Entity.tt b/Blueprint41/DatastoreTemplates/Domain_Data_Entity.tt index 94536f12..4a2e9f30 100644 --- a/Blueprint41/DatastoreTemplates/Domain_Data_Entity.tt +++ b/Blueprint41/DatastoreTemplates/Domain_Data_Entity.tt @@ -631,11 +631,11 @@ if (!DALModel.IsAbstract) { return ((ILookupHelper<<#= attr.OuterReturnType #>>)InnerData.<#= attr.Name #>).GetItems(from, till); } - public void Set<#= attr.Name #>(<#= attr.OuterReturnType #> value, DateTime? moment) - { - if (LazySet(Members.<#= attr.Name #>, ((ILookupHelper<<#= attr.OuterReturnType #>>)InnerData.<#= attr.Name #>).GetItems(moment, null), value, moment)) - ((ILookupHelper<<#= attr.OuterReturnType #>>)InnerData.<#= attr.Name #>).SetItem(value, moment); - } + //public void Set<#= attr.Name #>(<#= attr.OuterReturnType #> value, DateTime? moment) + //{ + // if (LazySet(Members.<#= attr.Name #>, ((ILookupHelper<<#= attr.OuterReturnType #>>)InnerData.<#= attr.Name #>).GetItems(moment, null), value, moment)) + // ((ILookupHelper<<#= attr.OuterReturnType #>>)InnerData.<#= attr.Name #>).SetItem(value, moment); + //} <# } else @@ -745,7 +745,20 @@ if (!DALModel.IsAbstract) private readonly Lazy _query<#= attr.Name.ToSingular() #>Relations = new Lazy(delegate() { return Transaction.CompiledQuery +<# + if (!attr.Relationship.InEntity.IsVirtual) + { +#> .Match(node.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias).In.<#= attr.Relationship.Name #>.Alias(out var relAlias).Out.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias)) +<# + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { +#> + .Match(node.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias).Out.<#= attr.Relationship.Name #>.Alias(out var relAlias).In.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias)) +<# + } +#> .Where(<#= attr.Direction.ToString().ToLowerInvariant() #>Alias.<#= DALModel.Key.Name #> == key) .Return(relAlias.ElementId.As("elementId"), relAlias.Properties("properties"), inAlias.As("in"), outAlias.As("out")) .Compile(); @@ -753,7 +766,20 @@ if (!DALModel.IsAbstract) public List<<#= attr.Relationship.Name #>> <#= attr.Name #>Where(Func<<#= attr.Relationship.Name #>.Alias, QueryCondition> expression) { var query = Transaction.CompiledQuery +<# + if (!attr.Relationship.InEntity.IsVirtual) + { +#> .Match(node.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias).In.<#= attr.Relationship.Name #>.Alias(out var relAlias).Out.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias)) +<# + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { +#> + .Match(node.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias).Out.<#= attr.Relationship.Name #>.Alias(out var relAlias).In.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias)) +<# + } +#> .Where(<#= attr.Direction.ToString().ToLowerInvariant() #>Alias.<#= DALModel.Key.Name #> == <#= DALModel.Key.Name #>) .And(expression.Invoke(new <#= attr.Relationship.Name #>.Alias(relAlias, inAlias, outAlias))) .Return(relAlias.ElementId.As("elementId"), relAlias.Properties("properties"), inAlias.As("in"), outAlias.As("out")) @@ -764,7 +790,20 @@ if (!DALModel.IsAbstract) public List<<#= attr.Relationship.Name #>> <#= attr.Name #>Where(Func<<#= attr.Relationship.Name #>.Alias, QueryCondition[]> expression) { var query = Transaction.CompiledQuery +<# + if (!attr.Relationship.InEntity.IsVirtual) + { +#> .Match(node.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias).In.<#= attr.Relationship.Name #>.Alias(out var relAlias).Out.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias)) +<# + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { +#> + .Match(node.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias).Out.<#= attr.Relationship.Name #>.Alias(out var relAlias).In.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias)) +<# + } +#> .Where(<#= attr.Direction.ToString().ToLowerInvariant() #>Alias.<#= DALModel.Key.Name #> == <#= DALModel.Key.Name #>) .And(expression.Invoke(new <#= attr.Relationship.Name #>.Alias(relAlias, inAlias, outAlias))) .Return(relAlias.ElementId.As("elementId"), relAlias.Properties("properties"), inAlias.As("in"), outAlias.As("out")) @@ -799,7 +838,7 @@ if (!DALModel.IsAbstract) return conditions.ToArray(); }); } - public void Add<#= attr.Name.ToSingular() #>(<#= attr.ForeignEntity.Name #> <#= attr.ForeignEntity.Name.ToCamelCase() #><#= attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true) #>) + public void Add<#= attr.Name.ToSingular() #>(<#= attr.ForeignEntity.ClassName #> <#= attr.ForeignEntity.Name.ToCamelCase() #><#= attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true) #>) { Dictionary properties = new Dictionary(); <# @@ -819,9 +858,9 @@ if (!DALModel.IsAbstract) } } #> - ((ILookupHelper<<#= attr.ForeignEntity.Name #>>)InnerData.<#= attr.Name #>).AddItem(<#= attr.ForeignEntity.Name.ToCamelCase() #>, null, properties); + ((ILookupHelper<<#= attr.ForeignEntity.ClassName #>>)InnerData.<#= attr.Name #>).AddItem(<#= attr.ForeignEntity.Name.ToCamelCase() #>, null, properties); } - public void Remove<#= attr.Name.ToSingular() #>(<#= attr.ForeignEntity.Name #> <#= attr.ForeignEntity.Name.ToCamelCase() #>) + public void Remove<#= attr.Name.ToSingular() #>(<#= attr.ForeignEntity.ClassName #> <#= attr.ForeignEntity.Name.ToCamelCase() #>) { <#= attr.Name #>.Remove(<#= attr.ForeignEntity.Name.ToCamelCase() #>); } @@ -847,7 +886,20 @@ if (!DALModel.IsAbstract) private readonly Lazy _query<#= attr.Name.ToSingular() #>Relations = new Lazy(delegate() { return Transaction.CompiledQuery +<# + if (!attr.Relationship.InEntity.IsVirtual) + { +#> .Match(node.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias).In.<#= attr.Relationship.Name #>.Alias(out var relAlias).Out.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias)) +<# + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { +#> + .Match(node.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias).Out.<#= attr.Relationship.Name #>.Alias(out var relAlias).In.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias)) +<# + } +#> .Where(<#= attr.Direction.ToString().ToLowerInvariant() #>Alias.<#= DALModel.Key.Name #> == key) .Return(relAlias.ElementId.As("elementId"), relAlias.Properties("properties"), inAlias.As("in"), outAlias.As("out")) .Compile(); @@ -855,7 +907,20 @@ if (!DALModel.IsAbstract) public List<<#= attr.Relationship.Name #>> <#= attr.Name #>Where(Func<<#= attr.Relationship.Name #>.Alias, QueryCondition> expression) { var query = Transaction.CompiledQuery +<# + if (!attr.Relationship.InEntity.IsVirtual) + { +#> .Match(node.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias).In.<#= attr.Relationship.Name #>.Alias(out var relAlias).Out.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias)) +<# + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { +#> + .Match(node.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias).Out.<#= attr.Relationship.Name #>.Alias(out var relAlias).In.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias)) +<# + } +#> .Where(<#= attr.Direction.ToString().ToLowerInvariant() #>Alias.<#= DALModel.Key.Name #> == <#= DALModel.Key.Name #>) .And(expression.Invoke(new <#= attr.Relationship.Name #>.Alias(relAlias, inAlias, outAlias))) .Return(relAlias.ElementId.As("elementId"), relAlias.Properties("properties"), inAlias.As("in"), outAlias.As("out")) @@ -866,7 +931,20 @@ if (!DALModel.IsAbstract) public List<<#= attr.Relationship.Name #>> <#= attr.Name #>Where(Func<<#= attr.Relationship.Name #>.Alias, QueryCondition[]> expression) { var query = Transaction.CompiledQuery +<# + if (!attr.Relationship.InEntity.IsVirtual) + { +#> .Match(node.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias).In.<#= attr.Relationship.Name #>.Alias(out var relAlias).Out.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias)) +<# + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { +#> + .Match(node.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias).Out.<#= attr.Relationship.Name #>.Alias(out var relAlias).In.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias)) +<# + } +#> .Where(<#= attr.Direction.ToString().ToLowerInvariant() #>Alias.<#= DALModel.Key.Name #> == <#= DALModel.Key.Name #>) .And(expression.Invoke(new <#= attr.Relationship.Name #>.Alias(relAlias, inAlias, outAlias))) .Return(relAlias.ElementId.As("elementId"), relAlias.Properties("properties"), inAlias.As("in"), outAlias.As("out")) @@ -905,7 +983,7 @@ if (!DALModel.IsAbstract) return conditions.ToArray(); }); } - public void Add<#= attr.Name.ToSingular() #>(<#= attr.ForeignEntity.Name #> <#= attr.ForeignEntity.Name.ToCamelCase() #>, DateTime? moment<#= attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true) #>) + public void Add<#= attr.Name.ToSingular() #>(<#= attr.ForeignEntity.ClassName #> <#= attr.ForeignEntity.Name.ToCamelCase() #>, DateTime? moment<#= attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true) #>) { if (moment is null) moment = DateTime.UtcNow; @@ -928,9 +1006,9 @@ if (!DALModel.IsAbstract) } } #> - ((ILookupHelper<<#= attr.ForeignEntity.Name #>>)InnerData.<#= attr.Name #>).AddItem(<#= attr.ForeignEntity.Name.ToCamelCase() #>, moment, properties); + ((ILookupHelper<<#= attr.ForeignEntity.ClassName #>>)InnerData.<#= attr.Name #>).AddItem(<#= attr.ForeignEntity.Name.ToCamelCase() #>, moment, properties); } - public void Remove<#= attr.Name.ToSingular() #>(<#= attr.ForeignEntity.Name #> <#= attr.ForeignEntity.Name.ToCamelCase() #>, DateTime? moment) + public void Remove<#= attr.Name.ToSingular() #>(<#= attr.ForeignEntity.ClassName #> <#= attr.ForeignEntity.Name.ToCamelCase() #>, DateTime? moment) { <#= attr.Name #>.Remove(<#= attr.ForeignEntity.Name.ToCamelCase() #>, moment); } @@ -959,7 +1037,20 @@ if (!DALModel.IsAbstract) private readonly Lazy _query<#= attr.Name #>Relation = new Lazy(delegate() { return Transaction.CompiledQuery +<# + if (!attr.Relationship.InEntity.IsVirtual) + { +#> .Match(node.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias).In.<#= attr.Relationship.Name #>.Alias(out var relAlias).Out.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias)) +<# + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { +#> + .Match(node.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias).Out.<#= attr.Relationship.Name #>.Alias(out var relAlias).In.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias)) +<# + } +#> .Where(<#= attr.Direction.ToString().ToLowerInvariant() #>Alias.<#= DALModel.Key.Name #> == key) .Return(relAlias.ElementId.As("elementId"), relAlias.Properties("properties"), inAlias.As("in"), outAlias.As("out")) .Compile(); @@ -967,7 +1058,20 @@ if (!DALModel.IsAbstract) public <#= attr.Relationship.Name #> Get<#= attr.Name #>If(Func<<#= attr.Relationship.Name #>.Alias, QueryCondition> expression) { var query = Transaction.CompiledQuery +<# + if (!attr.Relationship.InEntity.IsVirtual) + { +#> .Match(node.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias).In.<#= attr.Relationship.Name #>.Alias(out var relAlias).Out.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias)) +<# + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { +#> + .Match(node.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias).Out.<#= attr.Relationship.Name #>.Alias(out var relAlias).In.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias)) +<# + } +#> .Where(<#= attr.Direction.ToString().ToLowerInvariant() #>Alias.<#= DALModel.Key.Name #> == <#= DALModel.Key.Name #>) .And(expression.Invoke(new <#= attr.Relationship.Name #>.Alias(relAlias, inAlias, outAlias))) .Return(relAlias.ElementId.As("elementId"), relAlias.Properties("properties"), inAlias.As("in"), outAlias.As("out")) @@ -978,7 +1082,20 @@ if (!DALModel.IsAbstract) public <#= attr.Relationship.Name #> Get<#= attr.Name #>If(Func<<#= attr.Relationship.Name #>.Alias, QueryCondition[]> expression) { var query = Transaction.CompiledQuery +<# + if (!attr.Relationship.InEntity.IsVirtual) + { +#> .Match(node.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias).In.<#= attr.Relationship.Name #>.Alias(out var relAlias).Out.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias)) +<# + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { +#> + .Match(node.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias).Out.<#= attr.Relationship.Name #>.Alias(out var relAlias).In.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias)) +<# + } +#> .Where(<#= attr.Direction.ToString().ToLowerInvariant() #>Alias.<#= DALModel.Key.Name #> == <#= DALModel.Key.Name #>) .And(expression.Invoke(new <#= attr.Relationship.Name #>.Alias(relAlias, inAlias, outAlias))) .Return(relAlias.ElementId.As("elementId"), relAlias.Properties("properties"), inAlias.As("in"), outAlias.As("out")) @@ -1013,7 +1130,7 @@ if (!DALModel.IsAbstract) return conditions.ToArray(); }); } - public void Set<#= attr.Name #>(<#= attr.ForeignEntity.Name #> <#= attr.ForeignEntity.Name.ToCamelCase() #><#= attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true) #>) + public void Set<#= attr.Name #>(<#= attr.ForeignEntity.ClassName #> <#= attr.ForeignEntity.Name.ToCamelCase() #><#= attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true) #>) { Dictionary properties = new Dictionary(); <# @@ -1034,8 +1151,8 @@ if (!DALModel.IsAbstract) } #> - ((ILookupHelper<<#= attr.OuterReturnType #>>)InnerData.<#= attr.Name #>).SetItem(<#= attr.ForeignEntity.Name.ToCamelCase() #>, null, properties); - + if (LazySet(Members.<#= attr.Name #>, ((ILookupHelper<<#= attr.ForeignEntity.ClassName #>>)InnerData.<#= attr.Name #>).GetItems(null, null), <#= attr.ForeignEntity.Name.ToCamelCase() #>, null)) + ((ILookupHelper<<#= attr.ForeignEntity.ClassName #>>)InnerData.<#= attr.Name #>).SetItem(<#= attr.ForeignEntity.Name.ToCamelCase() #>, null, properties); } #endregion @@ -1062,7 +1179,20 @@ if (!DALModel.IsAbstract) private readonly Lazy _query<#= attr.Name #>Relation = new Lazy(delegate() { return Transaction.CompiledQuery +<# + if (!attr.Relationship.InEntity.IsVirtual) + { +#> .Match(node.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias).In.<#= attr.Relationship.Name #>.Alias(out var relAlias).Out.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias)) +<# + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { +#> + .Match(node.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias).Out.<#= attr.Relationship.Name #>.Alias(out var relAlias).In.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias)) +<# + } +#> .Where(<#= attr.Direction.ToString().ToLowerInvariant() #>Alias.<#= DALModel.Key.Name #> == key) .And(relAlias.Moment(moment)) .Return(relAlias.ElementId.As("elementId"), relAlias.Properties("properties"), inAlias.As("in"), outAlias.As("out")) @@ -1075,7 +1205,20 @@ if (!DALModel.IsAbstract) private readonly Lazy _query<#= attr.Name #>Relations = new Lazy(delegate() { return Transaction.CompiledQuery +<# + if (!attr.Relationship.InEntity.IsVirtual) + { +#> .Match(node.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias).In.<#= attr.Relationship.Name #>.Alias(out var relAlias).Out.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias)) +<# + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { +#> + .Match(node.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias).Out.<#= attr.Relationship.Name #>.Alias(out var relAlias).In.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias)) +<# + } +#> .Where(<#= attr.Direction.ToString().ToLowerInvariant() #>Alias.<#= DALModel.Key.Name #> == key) .Return(relAlias.ElementId.As("elementId"), relAlias.Properties("properties"), inAlias.As("in"), outAlias.As("out")) .Compile(); @@ -1086,7 +1229,20 @@ if (!DALModel.IsAbstract) moment = DateTime.UtcNow; var query = Transaction.CompiledQuery +<# + if (!attr.Relationship.InEntity.IsVirtual) + { +#> .Match(node.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias).In.<#= attr.Relationship.Name #>.Alias(out var relAlias).Out.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias)) +<# + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { +#> + .Match(node.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias).Out.<#= attr.Relationship.Name #>.Alias(out var relAlias).In.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias)) +<# + } +#> .Where(<#= attr.Direction.ToString().ToLowerInvariant() #>Alias.<#= DALModel.Key.Name #> == <#= DALModel.Key.Name #>) .And(expression.Invoke(new <#= attr.Relationship.Name #>.Alias(relAlias, inAlias, outAlias))) .And(relAlias.Moment(moment)) @@ -1101,7 +1257,20 @@ if (!DALModel.IsAbstract) moment = DateTime.UtcNow; var query = Transaction.CompiledQuery +<# + if (!attr.Relationship.InEntity.IsVirtual) + { +#> .Match(node.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias).In.<#= attr.Relationship.Name #>.Alias(out var relAlias).Out.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias)) +<# + } + else if (!attr.Relationship.OutEntity.IsVirtual) + { +#> + .Match(node.<#= attr.Relationship.OutEntity.Name #>.Alias(out var outAlias).Out.<#= attr.Relationship.Name #>.Alias(out var relAlias).In.<#= attr.Relationship.InEntity.Name #>.Alias(out var inAlias)) +<# + } +#> .Where(<#= attr.Direction.ToString().ToLowerInvariant() #>Alias.<#= DALModel.Key.Name #> == <#= DALModel.Key.Name #>) .And(expression.Invoke(new <#= attr.Relationship.Name #>.Alias(relAlias, inAlias, outAlias))) .And(relAlias.Moment(moment)) @@ -1193,7 +1362,7 @@ if (!DALModel.IsAbstract) return conditions.ToArray(); }); } - public void Set<#= attr.Name #>(<#= attr.ForeignEntity.Name #> <#= attr.ForeignEntity.Name.ToCamelCase() #>, DateTime? moment<#= attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true) #>) + public void Set<#= attr.Name #>(<#= attr.ForeignEntity.ClassName #> <#= attr.ForeignEntity.Name.ToCamelCase() #>, DateTime? moment<#= attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true) #>) { if (moment is null) moment = DateTime.UtcNow; @@ -1217,7 +1386,8 @@ if (!DALModel.IsAbstract) } #> - ((ILookupHelper<<#= attr.OuterReturnType #>>)InnerData.<#= attr.Name #>).SetItem(<#= attr.ForeignEntity.Name.ToCamelCase() #>, moment, properties); + if (LazySet(Members.<#= attr.Name #>, ((ILookupHelper<<#= attr.ForeignEntity.ClassName #>>)InnerData.<#= attr.Name #>).GetItems(moment, null), <#= attr.ForeignEntity.Name.ToCamelCase() #>, moment)) + ((ILookupHelper<<#= attr.ForeignEntity.ClassName #>>)InnerData.<#= attr.Name #>).SetItem(<#= attr.ForeignEntity.Name.ToCamelCase() #>, moment, properties); } #endregion @@ -1268,10 +1438,10 @@ if (!DALModel.IsAbstract) #region Members for interface I<#= inherited.Name #> <# - foreach (Property attr in inherited.Properties) + foreach (EntityProperty attr in inherited.Properties) { #> - public Property <#= attr.Name #> { get; } = <#= Datastore.GetType().FullName.Replace("+", ".") #>.Model.Entities["<#= inherited.Name #>"].Properties["<#= attr.Name #>"]; + public EntityProperty <#= attr.Name #> { get; } = <#= Datastore.GetType().FullName.Replace("+", ".") #>.Model.Entities["<#= inherited.Name #>"].Properties["<#= attr.Name #>"]; <# } #> @@ -1304,10 +1474,10 @@ if (!DALModel.IsAbstract) internal <#= DALModel.ClassName #>FullTextMembers() { } <# - foreach (Property attr in DALModel.FullTextIndexProperties) + foreach (EntityProperty attr in DALModel.FullTextIndexProperties) { #> - public Property <#= attr.Name #> { get; } = <#= Datastore.GetType().FullName.Replace("+", ".") #>.Model.Entities["<#= attr.Parent.Name #>"].Properties["<#= attr.Name #>"]; + public EntityProperty <#= attr.Name #> { get; } = <#= Datastore.GetType().FullName.Replace("+", ".") #>.Model.Entities["<#= attr.Parent.Name #>"].Properties["<#= attr.Name #>"]; <# } #> diff --git a/Blueprint41/DatastoreTemplates/Domain_Data_Entity_Abstract.cs b/Blueprint41/DatastoreTemplates/Domain_Data_Entity_Abstract.cs index c125c3a1..c7a13d71 100644 --- a/Blueprint41/DatastoreTemplates/Domain_Data_Entity_Abstract.cs +++ b/Blueprint41/DatastoreTemplates/Domain_Data_Entity_Abstract.cs @@ -302,6 +302,13 @@ public override string TransformText() } + + #line default + #line hidden + this.Write("\r\n #region Properties\r\n"); + + #line 102 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + foreach (Property attr in DALModel.Properties) { if (attr.PropertyType == PropertyType.Collection || attr.IsNodeType) @@ -312,21 +319,21 @@ public override string TransformText() #line hidden this.Write(" "); - #line 105 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 108 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.OuterReturnType)); #line default #line hidden this.Write(" "); - #line 105 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 108 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(" { get; }\r\n"); - #line 106 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 109 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" } else @@ -338,28 +345,28 @@ public override string TransformText() #line hidden this.Write(" "); - #line 112 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 115 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.OuterReturnType)); #line default #line hidden this.Write(" "); - #line 112 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 115 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(" { "); - #line 112 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 115 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(accessors)); #line default #line hidden this.Write(" }\r\n"); - #line 113 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 116 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" if (attr.PropertyType == PropertyType.Lookup && attr.Relationship.IsTimeDependent) { @@ -369,40 +376,699 @@ public override string TransformText() #line hidden this.Write(" "); - #line 117 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 120 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.OuterReturnType)); #line default #line hidden this.Write(" Get"); - #line 117 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 120 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden - this.Write("(DateTime moment);\r\n void Set"); + this.Write("(DateTime moment);\r\n //void Set"); - #line 118 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 121 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("("); - #line 118 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 121 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.OuterReturnType)); #line default #line hidden this.Write(" value, DateTime? moment);\r\n"); - #line 119 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 122 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" } } } + + #line default + #line hidden + this.Write("\r\n #endregion\r\n\r\n #region Relationship Properties\r\n"); + + #line 131 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + + foreach (var attr in DALModel.GetPropertiesOfBaseTypesAndSelf().Where(property => property.PropertyType != PropertyType.Attribute)) + { + if (attr.PropertyType == PropertyType.Collection) + { + if (!attr.Relationship.IsTimeDependent) + { +/******************************************************************************************* +*** *** +*** NORMAL COLLECTION *** +*** *** +*******************************************************************************************/ + + + #line default + #line hidden + this.Write("\r\n #region "); + + #line 145 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write(" (Collection)\r\n\r\n List<"); + + #line 147 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write("> "); + + #line 147 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name.ToSingular())); + + #line default + #line hidden + this.Write("Relations();\r\n List<"); + + #line 148 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write("> "); + + #line 148 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("Where(Func<"); + + #line 148 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias, QueryCondition> expression);\r\n List<"); + + #line 149 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write("> "); + + #line 149 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("Where(Func<"); + + #line 149 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias, QueryCondition[]> expression);\r\n List<"); + + #line 150 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write("> "); + + #line 150 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("Where("); + + #line 150 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Properties.ToJsonNotation())); + + #line default + #line hidden + this.Write(");\r\n void Add"); + + #line 151 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name.ToSingular())); + + #line default + #line hidden + this.Write("("); + + #line 151 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.ClassName)); + + #line default + #line hidden + this.Write(" "); + + #line 151 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name.ToCamelCase())); + + #line default + #line hidden + + #line 151 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true))); + + #line default + #line hidden + this.Write(");\r\n void Remove"); + + #line 152 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name.ToSingular())); + + #line default + #line hidden + this.Write("("); + + #line 152 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.ClassName)); + + #line default + #line hidden + this.Write(" "); + + #line 152 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name.ToCamelCase())); + + #line default + #line hidden + this.Write(");\r\n\r\n #endregion\r\n"); + + #line 155 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + + } + else + { +/******************************************************************************************* +*** *** +*** TIME DEPENDENT COLLECTION *** +*** *** +*******************************************************************************************/ + + + #line default + #line hidden + this.Write("\r\n #region "); + + #line 166 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write(" (Time Dependent Collection)\r\n\r\n List<"); + + #line 168 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write("> "); + + #line 168 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name.ToSingular())); + + #line default + #line hidden + this.Write("Relations();\r\n List<"); + + #line 169 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write("> "); + + #line 169 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("Where(Func<"); + + #line 169 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias, QueryCondition> expression);\r\n List<"); + + #line 170 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write("> "); + + #line 170 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("Where(Func<"); + + #line 170 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias, QueryCondition[]> expression);\r\n List<"); + + #line 171 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write("> "); + + #line 171 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("Where(JsNotation Moment = default"); + + #line 171 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true, true))); + + #line default + #line hidden + this.Write(");\r\n void Add"); + + #line 172 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name.ToSingular())); + + #line default + #line hidden + this.Write("("); + + #line 172 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.ClassName)); + + #line default + #line hidden + this.Write(" "); + + #line 172 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name.ToCamelCase())); + + #line default + #line hidden + this.Write(", DateTime? moment"); + + #line 172 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true))); + + #line default + #line hidden + this.Write(");\r\n void Remove"); + + #line 173 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name.ToSingular())); + + #line default + #line hidden + this.Write("("); + + #line 173 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.ClassName)); + + #line default + #line hidden + this.Write(" "); + + #line 173 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name.ToCamelCase())); + + #line default + #line hidden + this.Write(", DateTime? moment);\r\n\r\n #endregion\r\n"); + + #line 176 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + + } + } + else if (attr.PropertyType == PropertyType.Lookup) + { + if (!attr.Relationship.IsTimeDependent) + { +/******************************************************************************************* +*** *** +*** NORMAL LOOKUP *** +*** *** +*******************************************************************************************/ + + + #line default + #line hidden + this.Write("\r\n #region "); + + #line 190 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write(" (Lookup)\r\n\r\n "); + + #line 192 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(" "); + + #line 192 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("Relation();\r\n "); + + #line 193 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(" Get"); + + #line 193 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("If(Func<"); + + #line 193 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias, QueryCondition> expression);\r\n "); + + #line 194 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(" Get"); + + #line 194 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("If(Func<"); + + #line 194 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias, QueryCondition[]> expression);\r\n "); + + #line 195 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(" Get"); + + #line 195 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("If("); + + #line 195 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Properties.ToJsonNotation())); + + #line default + #line hidden + this.Write(");\r\n void Set"); + + #line 196 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("("); + + #line 196 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.ClassName)); + + #line default + #line hidden + this.Write(" "); + + #line 196 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name.ToCamelCase())); + + #line default + #line hidden + + #line 196 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true))); + + #line default + #line hidden + this.Write(");\r\n\r\n #endregion\r\n"); + + #line 199 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + + } + else + { +/******************************************************************************************* +*** *** +*** TIME DEPENDENT LOOKUP *** +*** *** +*******************************************************************************************/ + + + #line default + #line hidden + this.Write("\r\n #region "); + + #line 210 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write(" (Time Dependent Lookup)\r\n\r\n "); + + #line 212 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(" "); + + #line 212 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("Relation(DateTime? moment = null);\r\n List<"); + + #line 213 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write("> "); + + #line 213 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("Relations();\r\n "); + + #line 214 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(" Get"); + + #line 214 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("If(DateTime? moment, Func<"); + + #line 214 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias, QueryCondition> expression);\r\n "); + + #line 215 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(" Get"); + + #line 215 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("If(DateTime? moment, Func<"); + + #line 215 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias, QueryCondition[]> expression);\r\n "); + + #line 216 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(" Get"); + + #line 216 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("If(DateTime? moment"); + + #line 216 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true, true))); + + #line default + #line hidden + this.Write(");\r\n List<"); + + #line 217 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write("> "); + + #line 217 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("Where(Func<"); + + #line 217 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias, QueryCondition> expression);\r\n List<"); + + #line 218 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write("> "); + + #line 218 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("Where(Func<"); + + #line 218 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write(".Alias, QueryCondition[]> expression);\r\n List<"); + + #line 219 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Name)); + + #line default + #line hidden + this.Write("> "); + + #line 219 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("Where(JsNotation Moment = default"); + + #line 219 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true, true))); + + #line default + #line hidden + this.Write(");\r\n void Set"); + + #line 220 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); + + #line default + #line hidden + this.Write("("); + + #line 220 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.ClassName)); + + #line default + #line hidden + this.Write(" "); + + #line 220 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.ForeignEntity.Name.ToCamelCase())); + + #line default + #line hidden + this.Write(", DateTime? moment"); + + #line 220 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(attr.Relationship.Properties.ToJsonNotation(attr.Relationship, true))); + + #line default + #line hidden + this.Write(");\r\n\r\n #endregion\r\n"); + + #line 223 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + + } + } + } + +/******************************************************************************************* +*** *** +*** END RELATIONSHIP PROPERTIES *** +*** *** +*******************************************************************************************/ + + + #line default + #line hidden + this.Write(" #endregion\r\n\r\n"); + + #line 236 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + if (!string.IsNullOrEmpty(DALModel.UnidentifiedProperties)) { @@ -412,14 +1078,14 @@ public override string TransformText() this.Write(" \r\n #region Member for UnidentifiedProperties\r\n\r\n IDictionar" + "y "); - #line 130 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 243 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.UnidentifiedProperties)); #line default #line hidden this.Write(" { get; }\r\n\r\n #endregion\r\n"); - #line 133 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 246 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" } @@ -428,49 +1094,49 @@ public override string TransformText() #line hidden this.Write("\r\n "); - #line 137 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 250 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Inherits is null ? "" : "new ")); #line default #line hidden this.Write("I"); - #line 137 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 250 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Name)); #line default #line hidden this.Write("OriginalData OriginalVersion { get; }\r\n }\r\n\r\n public partial class "); - #line 140 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 253 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Name)); #line default #line hidden this.Write(" : OGMAbstractImpl<"); - #line 140 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 253 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Name)); #line default #line hidden this.Write(", "); - #line 140 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 253 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default #line hidden this.Write(", "); - #line 140 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 253 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.SystemReturnType)); #line default #line hidden this.Write(">\r\n {\r\n #region Initialize\r\n\r\n static "); - #line 144 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 257 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Name)); #line default @@ -478,7 +1144,7 @@ public override string TransformText() this.Write("()\r\n {\r\n Register.Types();\r\n }\r\n\r\n protected over" + "ride void RegisterGeneratedStoredQueries()\r\n {\r\n"); - #line 151 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 264 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" if (!DALModel.IsVirtual) { @@ -489,21 +1155,21 @@ public override string TransformText() this.Write(" #region LoadByKeys\r\n \r\n RegisterQuery(nameof(Lo" + "adByKeys), (query, alias) => query.\r\n Where(alias."); - #line 158 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 271 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default #line hidden this.Write(".In(Parameter.New<"); - #line 158 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 271 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.SystemReturnType)); #line default #line hidden this.Write(">(Param0))));\r\n\r\n #endregion\r\n\r\n"); - #line 162 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 275 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" foreach (Property attr in DALModel.Properties) { @@ -515,28 +1181,28 @@ public override string TransformText() #line hidden this.Write("\r\n #region LoadBy"); - #line 169 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 282 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("\r\n\r\n RegisterQuery(nameof(LoadBy"); - #line 171 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 284 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("), (query, alias) => query.\r\n Where(alias."); - #line 172 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 285 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write(" == Parameter.New(Param0)));\r\n\r\n #endregion\r\n"); - #line 175 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 288 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" } } @@ -546,7 +1212,7 @@ public override string TransformText() #line hidden this.Write(" AdditionalGeneratedStoredQueries();\r\n }\r\n"); - #line 181 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 294 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" foreach (Property attr in DALModel.Properties) { @@ -558,42 +1224,42 @@ public override string TransformText() #line hidden this.Write(" public static "); - #line 187 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 300 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default #line hidden this.Write(" LoadBy"); - #line 187 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 300 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("(string "); - #line 187 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 300 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name.ToCamelCase())); #line default #line hidden this.Write(")\r\n {\r\n return FromQuery(nameof(LoadBy"); - #line 189 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 302 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name)); #line default #line hidden this.Write("), new Parameter(Param0, "); - #line 189 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 302 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(attr.Name.ToCamelCase())); #line default #line hidden this.Write(")).FirstOrDefault();\r\n }\r\n"); - #line 191 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 304 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" } @@ -602,7 +1268,7 @@ public override string TransformText() #line hidden this.Write(" partial void AdditionalGeneratedStoredQueries();\r\n"); - #line 195 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 308 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" if (!DALModel.IsVirtual) { @@ -612,28 +1278,28 @@ public override string TransformText() #line hidden this.Write(" \r\n public static Dictionary<"); - #line 200 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 313 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.SystemReturnType)); #line default #line hidden this.Write(", "); - #line 200 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 313 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.ClassName)); #line default #line hidden this.Write("> LoadByKeys(IEnumerable<"); - #line 200 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 313 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.SystemReturnType)); #line default #line hidden this.Write("> "); - #line 200 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 313 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name.ToPlural().ToCamelCase())); #line default @@ -641,21 +1307,21 @@ public override string TransformText() this.Write(")\r\n {\r\n return FromQuery(nameof(LoadByKeys), new Parameter(Para" + "m0, "); - #line 202 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 315 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name.ToPlural().ToCamelCase())); #line default #line hidden this.Write(".ToArray(), typeof("); - #line 202 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 315 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.SystemReturnType)); #line default #line hidden this.Write("))).ToDictionary(item=> item."); - #line 202 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" + #line 315 "C:\_CirclesArrows\blueprint41\Blueprint41\DatastoreTemplates\Domain_Data_Entity_Abstract.tt" this.Write(this.ToStringHelper.ToStringWithCulture(DALModel.Key.Name)); #line default @@ -663,14 +1329,14 @@ public override string TransformText() this.Write(", item => item);\r\n }\r\n\r\n protected static void RegisterQuery(string" + " name, Func