开发者

Opening multiple temporary sqlite db in S#arp Architecture - Best practices

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 开发者_C百科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


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.)


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜