Browse Source

Update PersonDapperRepository.cs

pull/6809/head
Halil İbrahim Kalkan 6 years ago
parent
commit
3094f577a6
  1. 15
      framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository.cs

15
framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository.cs

@ -17,14 +17,19 @@ namespace Volo.Abp.Dapper.Repositories
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)) return (await (await GetDbConnectionAsync())
.ToList(); .QueryAsync<string>(
"select Name from People",
transaction: await GetDbTransactionAsync()
)
).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 }, return await (await GetDbConnectionAsync())
DbTransaction); .ExecuteAsync("update People set Name = @NewName", new {NewName = name},
await GetDbTransactionAsync());
} }
} }
} }

Loading…
Cancel
Save