From 20482140c124fd1d5caaffcc9b0dfe853b30dd6f Mon Sep 17 00:00:00 2001 From: Roy Date: Sat, 27 Jan 2018 17:18:10 +0200 Subject: Re-factored DAL Observables using EF Code First !!!!!! --- .../Tango.CodeGeneration/EntityCodeFile.cs | 6 +++ .../ObservablesContextCodeFile.cs | 12 +++++ .../Tango.CodeGeneration.csproj | 2 + .../Templates/EntityCodeFile.cshtml | 37 ++++--------- .../Templates/ObservablesContextCodeFile.cshtml | 60 ++++++++++++++++++++++ 5 files changed, 91 insertions(+), 26 deletions(-) create mode 100644 Software/Visual_Studio/Tango.CodeGeneration/ObservablesContextCodeFile.cs create mode 100644 Software/Visual_Studio/Tango.CodeGeneration/Templates/ObservablesContextCodeFile.cshtml (limited to 'Software/Visual_Studio/Tango.CodeGeneration') diff --git a/Software/Visual_Studio/Tango.CodeGeneration/EntityCodeFile.cs b/Software/Visual_Studio/Tango.CodeGeneration/EntityCodeFile.cs index bc0f37929..ad91e8117 100644 --- a/Software/Visual_Studio/Tango.CodeGeneration/EntityCodeFile.cs +++ b/Software/Visual_Studio/Tango.CodeGeneration/EntityCodeFile.cs @@ -62,6 +62,12 @@ namespace Tango.CodeGeneration /// public String Description { get; set; } + public bool IsForeignKey { get; set; } + + public String ForeignKeyName { get; set; } + + public bool Complex { get; set; } + /// /// Gets or sets a value indicating whether to initialize this field in the constructor. /// diff --git a/Software/Visual_Studio/Tango.CodeGeneration/ObservablesContextCodeFile.cs b/Software/Visual_Studio/Tango.CodeGeneration/ObservablesContextCodeFile.cs new file mode 100644 index 000000000..618af0916 --- /dev/null +++ b/Software/Visual_Studio/Tango.CodeGeneration/ObservablesContextCodeFile.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.CodeGeneration +{ + public class ObservablesContextCodeFile : Class + { + } +} diff --git a/Software/Visual_Studio/Tango.CodeGeneration/Tango.CodeGeneration.csproj b/Software/Visual_Studio/Tango.CodeGeneration/Tango.CodeGeneration.csproj index 1c491813a..ff9072a1a 100644 --- a/Software/Visual_Studio/Tango.CodeGeneration/Tango.CodeGeneration.csproj +++ b/Software/Visual_Studio/Tango.CodeGeneration/Tango.CodeGeneration.csproj @@ -67,6 +67,7 @@ + @@ -104,6 +105,7 @@ +