IRepository Extension method to access transaction and acquire lock