Implemented the repository for the NpgsqlProvider

The repository is implemented and working, but there is still some
refactoring needed to ensure that it correctly uses the EntityMap in all
queries and commands.