Use the Template <T> in createEntity method as method parameter.