From ae8b4aac1005611f1cea14bf835080a77ede8260 Mon Sep 17 00:00:00 2001 From: maliming Date: Thu, 9 Sep 2021 11:48:45 +0800 Subject: [PATCH] Update Dapper.md --- docs/en/Dapper.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/en/Dapper.md b/docs/en/Dapper.md index 0af569ad1f..d9874bbb7c 100644 --- a/docs/en/Dapper.md +++ b/docs/en/Dapper.md @@ -53,15 +53,15 @@ public class PersonDapperRepository : DapperRepository, ITransie public virtual async Task> GetAllPersonNames() { - var dbContext = await GetDbConnectionAsync(); - return (await dbContext.QueryAsync("select Name from People", transaction: await GetDbTransactionAsync())) + var dbConnection = await GetDbConnectionAsync(); + return (await dbConnection.QueryAsync("select Name from People", transaction: await GetDbTransactionAsync())) .ToList(); } public virtual async Task UpdatePersonNames(string name) { - var dbContext = await GetDbConnectionAsync(); - return await dbContext.ExecuteAsync("update People set Name = @NewName", new { NewName = name }, + var dbConnection = await GetDbConnectionAsync(); + return await dbConnection.ExecuteAsync("update People set Name = @NewName", new { NewName = name }, await GetDbTransactionAsync()); } }