Implemented unit of work pattern