diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-09-19 14:05:34 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-09-19 14:05:34 +0300 |
| commit | 48c5d636927f832497e8939a8423ecd1c16892d7 (patch) | |
| tree | 2eac011bc0aca659131992408d8d9abd61494ed5 /Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml | |
| parent | 1c64e05e5eb5fabe1548c124cbfb8aaab2d1c401 (diff) | |
| download | Tango-48c5d636927f832497e8939a8423ecd1c16892d7.tar.gz Tango-48c5d636927f832497e8939a8423ecd1c16892d7.zip | |
Implemented hardware parameter description and range through DB and observables generator.
Diffstat (limited to 'Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml')
| -rw-r--r-- | Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml b/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml index b5d47edab..950e24f79 100644 --- a/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml +++ b/Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFile.cshtml @@ -18,6 +18,7 @@ using Newtonsoft.Json; using System.Linq; using Tango.DAL.Remote.DB; using Tango.Core; +using System.ComponentModel; namespace Tango.BL.Entities { @@ -66,6 +67,13 @@ namespace Tango.BL.Entities @(prop.IsForeignKey ? "[ForeignKey(\"" + prop.ForeignKeyName + "\")]" : "") @(prop.XmlIgnore ? "[XmlIgnore]" : "") @(prop.XmlIgnore ? "[JsonIgnore]" : "") + @if (prop.RangeDescription != null) + { + <div> + [Description("@(prop.RangeDescription.Description)")] + [Range(@(prop.RangeDescription.Min),@(prop.RangeDescription.Max))] + </div> + } public @(prop.Construct || prop.Complex ? "virtual" : "") @(prop.Type) @(prop.Name) { get { return _@(prop.Name.ToLower()); } |
