- 调整 移除对 System.ValueType 的依赖,减少版本冲突问题;(目前 FreeSql.dll 无任何公用库依赖)

This commit is contained in:
28810
2020-03-07 16:08:03 +08:00
parent 4e5d15e044
commit 59b9b1272b
74 changed files with 1344 additions and 3358 deletions

View File

@ -73,14 +73,14 @@ public class RazorModel {
if (col.CsType != null)
{
var dbinfo = fsql.CodeFirst.GetDbInfo(col.CsType);
if (dbinfo != null && dbinfo.Value.dbtypeFull.Replace("NOT NULL", "").Trim() != col.DbTypeTextFull)
if (dbinfo != null && dbinfo.dbtypeFull.Replace("NOT NULL", "").Trim() != col.DbTypeTextFull)
sb.Add("DbType = \"" + col.DbTypeTextFull + "\"");
if (col.IsPrimary)
sb.Add("IsPrimary = true");
if (col.IsIdentity)
sb.Add("IsIdentity = true");
if (dbinfo != null && dbinfo.Value.isnullable != col.IsNullable)
if (dbinfo != null && dbinfo.isnullable != col.IsNullable)
{
if (col.IsNullable && fsql.DbFirst.GetCsType(col).Contains("?") == false && col.CsType.IsValueType)
sb.Add("IsNullable = true");