c# - MVC5 T4 ModelMetadata.Properties IsNullable or IsRequired -
b"h
i trying create replacement t4 template mvc5 controller. have working except 1 issue.
i need generate code each property in model, , looping through modelmetadata.properties
easy. not array of propertyinfo
s. rather array of propertymetadata
doesn't seem have info whether property required or not or if type nullable or not. properties in model of type int
, int?
both show type system.int32
.
furthermore there no way list of propertyinfo
s beingness can't type
object model scaffolding, beingness short type name passed template.
in summation: there way know in t4 template if property nullable?
thank you
c# asp.net-mvc t4 asp.net-mvc-scaffolding
No comments:
Post a Comment