I tried following the examples, using a Using statement to open an instance, create a session, attach to the database, open it, then perform some operations like opening a transaction and saving a record. But when I use this pattern for each operation. Each operation like a Save take around .5 second. So I think I am doing this wrong. but I am not sure how I should be doing this.
should I only have one Instance? can I have more if they are named differently?
can I / should I have more if I have more than one thread?
I see I can have multiple sessions open at the same time, I think that is OK but does every session need to be attached? should the database be opened for each session? I am getting inconsistent results when I test these various scenarios, Sometimes my tests pass sometimes I get exceptions , like trying to use a disposed object, or EsentTempPathInUseException.
So is there any guidance on how I should use this?