existing Identifier with zero value

Hi Kounalakis,

Yes, it's possible, just add this mapping to Entities that have integer key fields where value may by zero:

[IdUnsavedValue(-1)]
TMyEntity = class

You may use -1 or any other value (that will not exists as valid Id on your table) to represent unsaved entities.

Regards,

2 Likes