Can NHibernate persist to flat files instead of database?

亡梦爱人 提交于 2019-12-30 06:16:16

问题


Here is a curiousity question. I have an application that must support both flat files and the database as a place to persist data. I was thinking maybe using a .csv or tab-delimited set of files as input ...

Is it possible to use NHibernate to write to do both persistance tasks?


回答1:


Try using the Jet engine (see this)

Dialect and other nhibernate settings should be the ones for Microsoft Access.




回答2:


No not to the best of my knowledge. I have the same requirement and have ended up just using flat XML files and hand rolling all the CRUD.

Just today I did happen to notice this File System Database on codeplex but haven't looked into it properly yet.



来源:https://stackoverflow.com/questions/680994/can-nhibernate-persist-to-flat-files-instead-of-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!