Sqlite CodeFirst Enum Bug

This commit is contained in:
sunkaixuan 2017-10-21 15:21:26 +08:00
parent fb646c08c3
commit bc2cac5b04
2 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ namespace SqlSugar
{
var result = new DbColumnInfo()
{
DataType = this.Context.Ado.DbBind.GetDbTypeName(UtilMethods.GetUnderType(item.PropertyInfo).Name),
DataType = item.PropertyInfo.PropertyType.IsEnum?this.Context.Ado.DbBind.GetDbTypeName(UtilConstants.IntType.Name) :this.Context.Ado.DbBind.GetDbTypeName(UtilMethods.GetUnderType(item.PropertyInfo).Name),
TableId = entityInfo.Columns.IndexOf(item),
DbColumnName = item.DbColumnName.HasValue() ? item.DbColumnName : item.PropertyName,
IsPrimarykey = item.IsPrimarykey,