Skip to content

Commit

Permalink
style : format codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikoo-Asadnejad committed Oct 22, 2023
1 parent 227417b commit af104c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions GenericRepository/Repository/UnitOfWork/UnitOfWork.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ public async Task<int> SaveAsync()
int result = await _context.SaveChangesAsync();
return result;
}

public int Save()
=> _context.SaveChanges();

public async Task DisposeAsync()
=> await _context.DisposeAsync();

public void Dispose()
=> _context.Dispose();

Expand All @@ -29,11 +32,11 @@ public async Task<IDbContextTransaction> BeginTransactionAsync(CancellationToken
IDbContextTransaction dbContextTransaction = await _context.Database.BeginTransactionAsync(cancellationToken);
return dbContextTransaction;
}

public async Task RollbackTransactionAsync()
=>await _context.Database.RollbackTransactionAsync();

public async Task CommitTransactionAsync()
=> await _context.Database.CommitTransactionAsync();




}

0 comments on commit af104c2

Please sign in to comment.