mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 调整 移除对 System.ValueType 的依赖,减少版本冲突问题;(目前 FreeSql.dll 无任何公用库依赖)
This commit is contained in:
@ -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");
|
||||
|
Reference in New Issue
Block a user