Page 1 of 1

Nhibernate and ObservableLists

PostPosted: Sat Mar 02, 2013 4:41 pm
by Dunnerholl
Hi, I hope some people are still reading this.

Is there any elegant solution to use Observable anythings with Nhibernate?

Or put to other words, what is a common practice of binding Lists retrieved from Nhibernate to the UI?

I dont want to make any kind of wrapper classes, just to get this working. Its cumbersome work.

Cheers

Dunner

Re: Nhibernate and ObservableLists

PostPosted: Sun Mar 03, 2013 2:44 am
by Ephemeral
Are we talking about something for DOL's core? Or something that you can write with any toolkit to observe changes as they happen, cause I thought most of the ORM stuff does it for you (ADO I think does, but not sure?), either way it'll probably end up cumbersome for you.

Re: Nhibernate and ObservableLists

PostPosted: Sun Mar 03, 2013 11:39 am
by Dunnerholl
No a Dol core but a WPF editor tool for the database.

Re: Nhibernate and ObservableLists

PostPosted: Sun Mar 03, 2013 2:57 pm
by Dunnerholl
Found a way, it's called uNhAddIns.WPF.dll which has persistent lists that fire those stupid changed events.

Re: Nhibernate and ObservableLists

PostPosted: Sun Mar 03, 2013 9:56 pm
by Graveen
Good to know ! I never worked with NHibernate. Best i did with mainstream ORM was EF4, but, it was not leading to something serious.

The latest jewels i find were Dapper and his friend PetaPoco. Just don't have any projects to work on that would benefits one of them.

Re: Nhibernate and ObservableLists

PostPosted: Sun Mar 03, 2013 10:25 pm
by Ephemeral
Good now graveen, move DOL to EF or Nhibernate so we can have other DB's besides mysql :p

Re: Nhibernate and ObservableLists

PostPosted: Wed May 29, 2013 5:13 pm
by Aredhel
Good now graveen, move DOL to EF or Nhibernate so we can have other DB's besides mysql :p
My project at work (application server) is actually based on EF and speaking from experience, multiple DB provider support isn't as easy as it may seem. Yes, there are different EF providers, but the typical scenario is to target a single DB provider, which might be SQL, MySQL, Oracle etc. To target all of them with the exact same model is not a straightforward task (for example, you need a different SSDL to target Oracle, coming from SQL). But it can be done with some T4 scripting.

Re: Nhibernate and ObservableLists

PostPosted: Wed May 29, 2013 8:34 pm
by Graveen
Yop Aredhel !

I got hard time with T4. The generated layouts where crappy, but i had not written the scripts (and really don't want to). I had finally the occasion to work with Petapoco. Not LINQ compliant, but finally, very efficient.

Re: Nhibernate and ObservableLists

PostPosted: Wed May 29, 2013 8:47 pm
by Aredhel
Yop Aredhel !

I got hard time with T4. The generated layouts where crappy, but i had not written the scripts (and really don't want to). I had finally the occasion to work with Petapoco. Not LINQ compliant, but finally, very efficient.
Hiho Grav :)

Well, the idea is to have one master EDMX (MS SQL in my case) and then have T4 scripts perform some XSLT transformations (for example, Oracle requires all table/column names to be upper case). You'd then switch to alternate providers by referring to a different SSDL in the connection string.

First time I've heard of Petapoco, by the looks of it you're still tied to a single DB provider with that one (explicit SQL, no E-SQL layer).

Re: Nhibernate and ObservableLists

PostPosted: Mon Jun 03, 2013 10:35 pm
by Dinberg
Nice to see both Dunner and Aredhel still kicking about ;)

Re: Nhibernate and ObservableLists

PostPosted: Tue Jun 04, 2013 4:16 am
by Aredhel
Nice to see both Dunner and Aredhel still kicking about ;)
And Din too - hiya :D

Re: Nhibernate and ObservableLists

PostPosted: Tue Jun 04, 2013 10:45 pm
by Dinberg
Pah! As if I ever leave :D

Re: Nhibernate and ObservableLists

PostPosted: Tue Sep 03, 2013 4:57 pm
by Dunnerholl
is this thread really from this year?