PgSql CodeFirst Support Primarykeys

This commit is contained in:
sunkaixuan 2019-03-29 21:27:56 +08:00
parent d77f605e3a
commit 5a89c14e7a

View File

@ -10,7 +10,7 @@ namespace SqlSugar
public override void NoExistLogic(EntityInfo entityInfo)
{
var tableName = GetTableName(entityInfo);
Check.Exception(entityInfo.Columns.Where(it => it.IsPrimarykey).Count() > 1, "Use Code First ,The primary key must not exceed 1");
//Check.Exception(entityInfo.Columns.Where(it => it.IsPrimarykey).Count() > 1, "Use Code First ,The primary key must not exceed 1");
List<DbColumnInfo> columns = new List<DbColumnInfo>();
if (entityInfo.Columns.HasValue())
{