Created
November 22, 2018 13:57
-
-
Save mesuttalebi/65a066d520095d9e82af796570251038 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace AcerPlatformV2.Business.Services | |
{ | |
public class TransactionService : ITransactionService | |
{ | |
private IDbContextTransaction _transaction; | |
private readonly IUnitOfWork _unitOfWork; | |
public TransactionService(IUnitOfWork unitOfWork) | |
{ | |
_unitOfWork = unitOfWork; | |
} | |
public void BeginTransaction() | |
{ | |
_transaction = _unitOfWork.Context.Database.BeginTransaction(); | |
} | |
public void Commit() | |
{ | |
_transaction.Commit(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment