View Full Version : Use a dataset as an NHibernate provider
obsidienne
05-16-2007, 02:00 PM
Hi,
First a little context
We use a close software to rule our business
That software offers the possibility to call external functions
That "external call" can only send and receive a dataset
What we want to do:
We wan't to use NHibernate, to map the dataset receveid, with our objects.
Is it possible ?
Thanks
P.S
We can't change the closed software behavior.
boriska
05-18-2007, 01:39 PM
Hi,
if I correct understand you, you need some sort of mapping
dataset <->objects. In this case you don't need nhibernate at all, just look into AdoTemplate functionality. SpringAir sample solution could be a good entry point for you
Regards,
Boris
obsidienne
05-24-2007, 08:55 AM
Hi,
We have made some search according with your answer. It seems that ADO.NET respond to our constraints. DbProvider wants a connection to a database, but we haven't any database only an in memory dataset.
We can't find a way to use ADO template directly without creating a DbProvider.
Any ideas?
boriska
05-24-2007, 06:00 PM
Sorry, I could only slightly remember that I saw something like you need...
At http://www.springframework.net/doc-latest/reference/html/ado.html
you can see some docs about Queries and Lightweight Object Mapping(17.11. ) Spring Team developed 3 different mapping approaches bases on processing IDataReader.
I think if you look into the Spring.Net source code you can find interesting ideas for implementing your customized logic.
May be you could use LINQ or anything else?! Anyway I think it's up to you to implement mapping if you use DataSet's. The only question is how generic you solution should be...
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.