mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
update sqlite
This commit is contained in:
parent
88e74cdd0d
commit
b01c0488b4
@ -11,7 +11,10 @@ namespace SqlSugar
|
||||
{
|
||||
if (entityInfo.Columns.HasValue()&&entityInfo.IsDisabledUpdateAll==false)
|
||||
{
|
||||
Check.Exception(entityInfo.Columns.Where(it => it.IsPrimarykey).Count() > 1, "Use Code First ,The primary key must not exceed 1");
|
||||
if (entityInfo.Columns.Where(it => it.IsPrimarykey).Count() > 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var tableName = GetTableName(entityInfo);
|
||||
var dbColumns = this.Context.DbMaintenance.GetColumnInfosByTableName(tableName,false);
|
||||
|
@ -17,8 +17,15 @@ namespace OrmTest
|
||||
Db.DbMaintenance.TruncateTable<Test00111>();
|
||||
Db.Insertable(new Test00111()).ExecuteCommand();
|
||||
var list = Db.Queryable<Test00111>().ToList();
|
||||
Db.CodeFirst.InitTables<Test00111121>();
|
||||
}
|
||||
public class Test00111121
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public string id { get; set; }
|
||||
[SugarColumn(IsPrimaryKey =true)]
|
||||
public string creater { get; set; }
|
||||
}
|
||||
|
||||
public class Test00111
|
||||
{
|
||||
public int id { get; set; }
|
||||
|
Loading…
Reference in New Issue
Block a user