Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zqlovejyc authored May 13, 2021
1 parent 18f8b59 commit 7a59302
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ IRepository trans = null;
try
{
//开启事务
trans = _repository.BeginTrans();
trans = _repository.BeginTransaction();

//数据库写操作
await _repository.InsertAsync(entity);
Expand All @@ -239,7 +239,7 @@ catch (Exception)
}

//方式二
var res = await _repository.ExecuteTransAsync(async trans =>
var res = await _repository.ExecuteTransactionAsync(async trans =>
{
var retval = (await trans.InsertAsync(entity)) > 0;

Expand Down

0 comments on commit 7a59302

Please sign in to comment.