Fixes to make Idempotent work

Changed IsAssignableTo with IsGenericTypeOf
In Idempotent model changed Key to Id
Some refactoring to use strig.Format