Implemented Repository Pattern for transactions