Update Demo

This commit is contained in:
sunkaixuan 2019-01-12 19:32:15 +08:00
parent fc4179e778
commit 903ca6970f
3 changed files with 3 additions and 2 deletions

View File

@ -12,7 +12,7 @@ namespace OrmTest.Demo
public static void Init()
{
SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { ConnectionString = Config.ConnectionString, DbType = DbType.Sqlite, IsAutoCloseConnection = true });
SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { InitKeyType=InitKeyType.Attribute,ConnectionString = Config.ConnectionString, DbType = DbType.Sqlite, IsAutoCloseConnection = true });
db.Aop.OnLogExecuted = (sql, pars) =>

View File

@ -16,7 +16,8 @@ namespace OrmTest.Models
/// Desc:
/// Default:
/// Nullable:False
/// </summary>
/// </summary>
[SqlSugar.SugarColumn(IsPrimaryKey =true)]
public Guid PK {get;set;}
/// <summary>