I am using Breeze to create a dynamic data edit grid. After I add a new entity to the manager, edit the properties, save it to a WebAPI service and make a local query, I get the same entity twice. One entity is with the server generated key in entitystate unchanged, the other is with primarykey -1 and in entitystate added.
Don’t really know what I am doing wrong or did’nt understand the mechanics behind Breeze.
Note.
I am using a custom contextprovider with the savechanges method overridden. I am returning in the keymap the entity type, realvalue (DB generated key), tempvalue (key that was assigned by Breeze, e.g. -1).
EDIT.
I solved the problem. I had a bug in my custom contextprovider. I forget to actually add the keymap I was generating to the result of the savechangescore method.
I solved the problem, i had a bug in my custom contextprovider. I forget to actually add the keymap i was generating to the result ov the savechangescore method.