views:

16

answers:

2

Hi there,

I hope someone can give me some suggestion on how to face this issue. I have a S#arp Architecture application with a primary centralized db and that works fine. I need to extract data from the central bd and save it to a smaller sqlite db and then, eventually import it back. The sqlite connection has to be temporary. Open the connection, save or retrieve the data, close the connection. What is the best way to achieve my goal? I was thinking to use NhibernateSession.Addonfiguration(...) to access the sqlite db, work on it and then close the session factory, but I don't know if this is the best solution.

Should I pursue this way or I am better of using a traditional approach? Thank you in advance

A: 

The SQLite database name that you are looking for is :memory:, which translates to an in-memory temporary database. How to write that for NHibernate, I really don't know. (Sorry.)

Donal Fellows
Hi Donal, maybe I didn't explain very well what I am trying to do, but the sqlite db has to be written to a file and then zipped.The answer I was looking for is what is the best way to dinamically add a sqlite db connection with S#arp Architecture at runtime.
oirfc
A: 

You were correct with the add configuration. You would need to look at that path, but what you are doing is really an edge case and might not work as expected.

Alec Whittington