Newest version C#, Self Servicing, 2 Classes
What is the best practise for this situation.
I have a grid bound to an Entity Collection. The Entity's ID field in the DB is a standard auto-numbering int.
In code I add multiple entities, but the Grid complains that there are multiple entities with ID =0.
If I save to the DB after each add and refresh it's fine of course as the ID field picks up the value that SCOPE_IDENTITY() give it.
Is there a way to get a 'fake' id that auto updates in memory, then hen saves, uses the DB's auto-numbering?