diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2020-01-27 09:19:11 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2020-01-27 09:19:11 +0200 |
| commit | ddda6089bff56e80703c8d2dce297919edc58bf1 (patch) | |
| tree | 7702c5cf169124d522eacc7f1a9e0878373baedd /Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml | |
| parent | 1d4d327571d4c0c9f4e17411551bd4dae1e2aed0 (diff) | |
| parent | bf2f3245339b9fd9148a2ad25b5ba3320e970cc1 (diff) | |
| download | Tango-ddda6089bff56e80703c8d2dce297919edc58bf1.tar.gz Tango-ddda6089bff56e80703c8d2dce297919edc58bf1.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml')
| -rw-r--r-- | Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml | 31 |
1 files changed, 26 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..76c035df9 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,32 @@ 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> + } + if (prop.PropertyExtension.HasIndex) + { + <div> + [PropertyIndex(@(prop.PropertyExtension.Index))] + </div> + } } public @(prop.Construct || prop.Complex ? "virtual" : "") @(prop.Type) @(prop.Name) { |
