I'm using DevForce 6.1 with Silverlight.
I have a single instance of EntityManager. I create a new entity, add it to the manager and in some instances I get this error:-
An entity with this key: TrackingEvent: -100 already exists in this EntityManager
In my repository I have (nothing really fancy - I'm using INT in SQL Server as a IdentityColumn)
public TrackingEvent CreateTrackingEvent()
var aTrackingEvent = Manager.CreateEntity<TrackingEvent>();
Once I've assigned values to all the fields, I do a SaveAsync().
It's possible that the CreateTrackingEvent may get called at the same time but I can't stop that (nature of the application).
Surely between the GenerateId and AddEntity, the EM can keep the ID's unique?
Do I need create my own IdGenerator?