* Replaced IdGeneratorHelper with DI service that can be replaced by user * removed license comments and unnecessary usings * check Id null before assigning autogenerated id * fix: unit test Co-authored-by: ElderJames <shunjiey@hotmail.com>