diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2020-01-26 10:49:48 +0200 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2020-01-26 10:49:48 +0200 |
| commit | b036bae722696ce97279fa556394379688508f12 (patch) | |
| tree | e45372a748a501649b8d45e3143be9001566ed95 /Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml | |
| parent | 08a821df17dcfe04b6749ffdf326a8265285764c (diff) | |
| parent | 2367c43d732aea2ea169f6fa5844fc877d96632d (diff) | |
| download | Tango-b036bae722696ce97279fa556394379688508f12.tar.gz Tango-b036bae722696ce97279fa556394379688508f12.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) { |
