mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 18:52:50 +08:00
optimize internal methods
This commit is contained in:
parent
63dccf3e4c
commit
103ae63e9f
@ -44,7 +44,8 @@ namespace FreeSql
|
|||||||
case DataType.KingbaseES:
|
case DataType.KingbaseES:
|
||||||
case DataType.OdbcKingbaseES:
|
case DataType.OdbcKingbaseES:
|
||||||
case DataType.ShenTong:
|
case DataType.ShenTong:
|
||||||
if (_tableIdentitys.Length == 1 && _table.Primarys.Length == 1)
|
case DataType.Firebird: //firebird 只支持单条插入 returning
|
||||||
|
if (_tableIdentitys.Length == 1)
|
||||||
{
|
{
|
||||||
await DbContextFlushCommandAsync();
|
await DbContextFlushCommandAsync();
|
||||||
var idtval = await this.OrmInsert(data).ExecuteIdentityAsync();
|
var idtval = await this.OrmInsert(data).ExecuteIdentityAsync();
|
||||||
@ -68,7 +69,7 @@ namespace FreeSql
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
if (_tableIdentitys.Length == 1 && _table.Primarys.Length == 1)
|
if (_tableIdentitys.Length == 1)
|
||||||
{
|
{
|
||||||
await DbContextFlushCommandAsync();
|
await DbContextFlushCommandAsync();
|
||||||
var idtval = await this.OrmInsert(data).ExecuteIdentityAsync();
|
var idtval = await this.OrmInsert(data).ExecuteIdentityAsync();
|
||||||
|
@ -44,6 +44,7 @@ namespace FreeSql
|
|||||||
case DataType.KingbaseES:
|
case DataType.KingbaseES:
|
||||||
case DataType.OdbcKingbaseES:
|
case DataType.OdbcKingbaseES:
|
||||||
case DataType.ShenTong:
|
case DataType.ShenTong:
|
||||||
|
case DataType.Firebird: //firebird 只支持单条插入 returning
|
||||||
if (_tableIdentitys.Length == 1)
|
if (_tableIdentitys.Length == 1)
|
||||||
{
|
{
|
||||||
DbContextFlushCommand();
|
DbContextFlushCommand();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user