I tried to follow the examples, using the Using statement to open an instance, create a session, attach to the database, open it, and then perform some operations, such as opening a transaction and saving the record. But when I use this template for every operation. Each save operation takes about 0.5 seconds. Therefore, I think that I am doing it wrong. but I'm not sure how I should do it.
Should I have only one instance? can i have more if they are called differently?
can i / should i have more if i have multiple threads?
I see that I can open several sessions at the same time, I think that everything is in order, but do I need to connect every session? Should I open a database for each session? I get inconsistent results when I test these different scenarios. Sometimes my tests pass sometimes, I get exceptions, for example, trying to use a located object or an EsentTempPathInUseException.
So, are there any recommendations as to how I should use this?
Noel source share