public static TddUnitOfWork Get(TddEntities entities) { var res = new TddUnitOfWork { Entities = entities }; return res; }
public static TddUnitOfWork Get(TddEntities entities) { var res = new TddUnitOfWork { Entities = entities }; return(res); }
public bool TransferMoney(Account sender, Account recipient, int amount) { using (this._unitOfWork = this._unitOfWorkFactory.CreateUnitOfWork()) { if (AccountRepository.TransferMoney(sender, recipient, amount)) { this._unitOfWork.Commit(); return true; } return false; } }
public Account GetById(int id) { using (this._unitOfWork = this._unitOfWorkFactory.CreateUnitOfWork()) { return AccountRepository.GetById(id); } }
public TddUnitOfWork CreateUnitOfWork() { return(TddUnitOfWork.Get(new TddEntities())); }
public void SetContext(TddUnitOfWork unitOfWork) { this._context = unitOfWork.Entities; }
public AccountRepository(TddUnitOfWork unitOfWork) { this._context = unitOfWork.Entities; }