列设置nullable只支持RequiredAttribute和Nullable<>
This commit is contained in:
parent
e8b8b6000d
commit
dfc4e91cd6
|
@ -37,13 +37,13 @@ namespace Falcon.SugarApi.DatabaseDefinitions
|
||||||
//if (sc != null) {
|
//if (sc != null) {
|
||||||
// c.IsNullable = sc.IsNullable;
|
// c.IsNullable = sc.IsNullable;
|
||||||
//}
|
//}
|
||||||
var isNullableTypes = new Type[] { typeof(string) };
|
//var isNullableTypes = new Type[] { typeof(string) };
|
||||||
if (isNullableTypes.Contains(pt)) {
|
//if (isNullableTypes.Contains(pt)) {
|
||||||
c.IsNullable = true;
|
// c.IsNullable = true;
|
||||||
}
|
//}
|
||||||
else {
|
//else {
|
||||||
c.IsNullable = false;
|
// c.IsNullable = false;
|
||||||
}
|
//}
|
||||||
//if (pt == typeof(string) && pt.GetCustomAttribute<RequiredAttribute>() == null) {
|
//if (pt == typeof(string) && pt.GetCustomAttribute<RequiredAttribute>() == null) {
|
||||||
// c.IsNullable = true;
|
// c.IsNullable = true;
|
||||||
//}
|
//}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user