I read the breeze.js documentation (by the way, excellent documentation), but I have doubts about the EntityManager.
Suppose I have the following factory method:
var createManager = function () { return new breeze.EntityManager({ serviceName: serviceName, metadataStore: store }); };
Then I define two instances of Entitymanager:
em1 = createManager(); em2 = createManager();
If call
em1.saveChanges();
Does em2 changes?
Do em1 and em2 common cache?
If not, do I need to create a Singleton EntityManager? In my project, I access EntityManager in many places, swap objects among them, so I'm not sure which best (or the right) architecture should follow.
source share