diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.CodeGeneration')
| -rw-r--r-- | Software/Visual_Studio/Tango.CodeGeneration/EntityCodeFile.cs | 2 | ||||
| -rw-r--r-- | Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.CodeGeneration/EntityCodeFile.cs b/Software/Visual_Studio/Tango.CodeGeneration/EntityCodeFile.cs index ad91e8117..fc05a1259 100644 --- a/Software/Visual_Studio/Tango.CodeGeneration/EntityCodeFile.cs +++ b/Software/Visual_Studio/Tango.CodeGeneration/EntityCodeFile.cs @@ -57,6 +57,8 @@ namespace Tango.CodeGeneration /// </summary> public String Type { get; set; } + public bool XmlIgnore { get; set; } + /// <summary> /// Gets or sets the description. /// </summary> diff --git a/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml b/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml index 0c81791cd..4cdb1d6fa 100644 --- a/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml +++ b/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml @@ -3,6 +3,8 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; +using System.Xml.Serialization; +using Newtonsoft.Json; using System.Linq; using Tango.DAL.Remote.DB; @@ -20,6 +22,8 @@ namespace Tango.Integration.Observables /// </summary> @(!prop.Construct && !prop.Complex ? "[Column(\"" + prop.FieldName + "\")]" : "") @(prop.IsForeignKey ? "[ForeignKey(\"" + prop.ForeignKeyName + "\")]" : "") + @(prop.XmlIgnore ? "[XmlIgnore]" : "") + @(prop.XmlIgnore ? "[JsonIgnore]" : "") public @(prop.Construct || prop.Complex ? "virtual" : "") @(prop.Type) @(prop.Name) { get { return _@(prop.Name.ToLower()); } |
