mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 10:08:19 +08:00
Remove nvarchar to guid check
This commit is contained in:
@@ -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)]
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user