Browse Source

Merge pull request #9990 from abpframework/auto-merge/rel-4-4/543

Merge branch dev with rel-4.4
pull/9995/head
maliming 5 years ago
committed by GitHub
parent
commit
bdcff4b5d6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      docs/en/Dapper.md

8
docs/en/Dapper.md

@ -53,14 +53,16 @@ public class PersonDapperRepository : DapperRepository<MyAppDbContext>, ITransie
public virtual async Task<List<string>> GetAllPersonNames() public virtual async Task<List<string>> GetAllPersonNames()
{ {
return (await DbConnection.QueryAsync<string>("select Name from People", transaction: DbTransaction)) var dbConnection = await GetDbConnectionAsync();
return (await dbConnection.QueryAsync<string>("select Name from People", transaction: await GetDbTransactionAsync()))
.ToList(); .ToList();
} }
public virtual async Task<int> UpdatePersonNames(string name) public virtual async Task<int> UpdatePersonNames(string name)
{ {
return await DbConnection.ExecuteAsync("update People set Name = @NewName", new { NewName = name }, var dbConnection = await GetDbConnectionAsync();
DbTransaction); return await dbConnection.ExecuteAsync("update People set Name = @NewName", new { NewName = name },
await GetDbTransactionAsync());
} }
} }
``` ```

Loading…
Cancel
Save