Remove nvarchar to guid check

This commit is contained in:
sunkaixuna
2021-11-29 20:50:31 +08:00
parent e9e10a6a7d
commit 85ca336cc8
2 changed files with 12 additions and 2 deletions

View File

@@ -16,8 +16,18 @@ namespace OrmTest
db.Insertable(new UnitInsertMethod() { Name = "2" }).CallEntityMethod(it => it.Create("admin")).ExecuteCommand();
db.Updateable(new UnitInsertMethod() {Id=1, Name = "1" }).CallEntityMethod(it => it.Create()).ExecuteCommand();
db.Updateable(new UnitInsertMethod() { Name = "1" }).CallEntityMethod(it => it.Create("admint")).ExecuteCommand();
db.CodeFirst.InitTables<Unitsdafa111>();
db.Insertable(new Unitsdafa111()).ExecuteCommand();
db.Insertable(new Unitsdafa111() {Id=Guid.NewGuid(),Id2=Guid.NewGuid() }).ExecuteCommand();
var list=db.Queryable<Unitsdafa111>().ToList();
}
public class Unitsdafa111
{
[SqlSugar.SugarColumn(IsNullable =true,ColumnDataType ="nvarchar(50)")]
public Guid Id { get; set; }
[SqlSugar.SugarColumn(IsNullable = true, ColumnDataType = "nvarchar(50)")]
public Guid? Id2 { get; set; }
}
public class UnitInsertMethod
{
[SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)]

View File

@@ -314,7 +314,7 @@ namespace SqlSugar
{
get
{
return new List<string>() { "int32", "datetime", "decimal", "double", "byte", "guid" };
return new List<string>() { "int32", "datetime", "decimal", "double", "byte" };
}
}
#endregion