Fix repository tests.
Fix deserialize error.
Fix mapping error.
Refactor deployment repository.
Extract dapper logic to get generated id.