Andreas Sinz
12/25/2018, 1:06 PMid sometimes is nullabe and sometimes its not is with generics (depends on the Framework, if it supports it). You could separate the DB/Entity-stuff from the Domain stuff and have a NewMyEntity without an id and a MyEntity with an id and map those to/from your DB-Entity