Added the ConnectionResolver implementation.

Updated the repository to work with entities that have Ids other than int.