Skip to content

Commit b27115b

Browse files
Merge pull request #341 from RichardAnderson/master
Resolution for #33
2 parents a46a8e4 + ca2c580 commit b27115b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

SqlKata.Execution/Query.Extensions.Async.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@ public static async Task<T> InsertGetIdAsync<T>(this Query query, object data)
9292
return row.Id;
9393
}
9494

95+
public static async Task<T> InsertGetIdAsync<T>(this Query query, IReadOnlyDictionary<string, object> data)
96+
{
97+
var row = await QueryHelper.CreateQueryFactory(query)
98+
.FirstAsync<InsertGetIdRow<T>>(query.AsInsert(data, true));
99+
100+
return row.Id;
101+
}
102+
95103
public static async Task<int> InsertAsync(
96104
this Query query,
97105
IEnumerable<string> columns,

0 commit comments

Comments
 (0)