diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml')
| -rw-r--r-- | Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml b/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml index 950e24f79..780cc2647 100644 --- a/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml +++ b/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml @@ -19,6 +19,7 @@ using System.Linq; using Tango.DAL.Remote.DB; using Tango.Core; using System.ComponentModel; +using Tango.Core.CustomAttributes; namespace Tango.BL.Entities { @@ -67,12 +68,26 @@ namespace Tango.BL.Entities @(prop.IsForeignKey ? "[ForeignKey(\"" + prop.ForeignKeyName + "\")]" : "") @(prop.XmlIgnore ? "[XmlIgnore]" : "") @(prop.XmlIgnore ? "[JsonIgnore]" : "") - @if (prop.RangeDescription != null) + @if (prop.PropertyExtension != null) { - <div> - [Description("@(prop.RangeDescription.Description)")] - [Range(@(prop.RangeDescription.Min),@(prop.RangeDescription.Max))] - </div> + if (prop.PropertyExtension.HasDescription) + { + <div> + [Description("@(prop.PropertyExtension.Description)")] + </div> + } + if (prop.PropertyExtension.HasRange) + { + <div> + [Range(@(prop.PropertyExtension.Min),@(prop.PropertyExtension.Max))] + </div> + } + if (prop.PropertyExtension.HasStringFormat) + { + <div> + [StringFormat("@(prop.PropertyExtension.StringFormat)")] + </div> + } } public @(prop.Construct || prop.Complex ? "virtual" : "") @(prop.Type) @(prop.Name) { |
