コード例 #1
0
 /// <summary>
 /// Builds and runs a query to upsert the record into the table represented by <typeparamref name="T"/> using a sql merge
 /// </summary>
 public static void Upsert <T>(this IQueryRunner queryRunner, IDbTransaction transaction, T record, bool buffered = true, int?commandTimeout = null, bool useJson = false) =>
 queryRunner.Merge(transaction, new[] { record }, x => x.Insert().Update(), buffered, commandTimeout, useJson);