When you parse that string, why don't you create instances of some
"real" entity class directly, skipping the DataTable entirely?

/Oskar


2009/10/3 mathmax <[email protected]>:
>
> I have to load entities from a single field value containing a string
> to parse that look like this:
>
> {
>        label: "France by UPS Standard",
>        destination: "FR",
>        fees_table: "10000:14.95"
> }
> {
>        label: "France by GLS-Deutschland Standard",
>        destination: "FR",
>        fees_table: "10000:14.95"
> }
> ...
>
> So I get these data with a DbCommand, parse them and fill a dataTable.
> Then I currently create a table to the database side from this
> dataTable. After that, I use nHibernate to load this entities from
> this new table and all the associated classes. The other classes are
> binded to normal existing tables.
> So I find it painful to recreate a table each time on the database
> side, just to be able to load my entities with nhibernate. It would be
> nice If I could load them directly from the datatable. Is there any
> way to do this ?
>
>
>
> On 3 oct, 17:50, Ben Scheirman <[email protected]> wrote:
>> Not really.  Where are you getting this data table?  Are you performing a
>> query against a database to get it?
>>
>> NHibernate is specifically designed to manage persistence with your own
>> database, so if you're retreiving this database yourself, or from another
>> place (file system, web service) then you should re-think how you plan on
>> using NHibernate.
>>
>> On Sat, Oct 3, 2009 at 8:37 AM, mathmax <[email protected]> wrote:
>>
>> > Hello,
>>
>> > I would like to load an entity from a DataTable. Is it possible ?
>>
>> > Thanks.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to