mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2026-01-23 05:11:59 +08:00
Synchronization code
This commit is contained in:
@@ -82,6 +82,11 @@ namespace SqlSugar
|
||||
if (GetIdentityKeys().FirstOrDefault() == null)
|
||||
{
|
||||
sql = sql.Replace("returning \"\"", "");
|
||||
var id = this.Context.DbMaintenance.GetIsIdentities(this.Context.EntityMaintenance.GetTableName(this.InsertBuilder.GetTableNameString)).FirstOrDefault();
|
||||
if (id != null)
|
||||
{
|
||||
sql = sql.TrimEnd().TrimEnd(';')+ " returning " + this.SqlBuilder.GetTranslationColumnName(id) ;
|
||||
}
|
||||
}
|
||||
|
||||
return sql;
|
||||
|
||||
Reference in New Issue
Block a user