ADO.Net Data Services with NHibernate

Shawn Wildermuth has bridged the gap between the two, implementing IUpdatable on top of Linq to NHibernate. This means that you can now expose your NHibernate domain model as a set of REST services.

This functionality is now included with Linq for NHibernate. Thanks Shawn!

There is a live sample here: http://www.silverlightdata.com/Simple/NHibernate.aspx

Or you can hit the URLs directly and see what kind of formatting it has:

From a technological perspective, I think this is awesome. However, there are architectural issues with exposing your model in such a fashion. Specifically, with regards to availability and scalability on the operations side, and schema versioning and adaptability on the development side.

ADO.Net Data Services are a very thin wrapper around a DB, and as such, they should be treated as such. Do not expose them where you wouldn't want to expose your DB as well.

Print | posted on Monday, July 21, 2008 2:23 PM

Feedback


Gravatar

# re: ADO.Net Data Services with NHibernate 7/21/2008 8:21 PM Torkel

Nice!

hm.. isn't this similar to what the EF team think is so great about EF/EDM ?


Gravatar

# re: ADO.Net Data Services with NHibernate 7/21/2008 8:26 PM Ayende Rahien

Yes, and one of the reasons that I am not seeing much reason for excitement there.


Gravatar

# re: ADO.Net Data Services with NHibernate 7/22/2008 9:57 AM Shawn Wildermuth

The EF/EDM and ADO.NET Data Services are not really related or speak to the same problem. See the bottom of my blog post about caveats in using NHibernate and ADO.NET Data Services here for some of my perspective:

http://wildermuth.com/2008/07/21/NHibernate_LINQ_with_ADO_NET_Data_Services


Gravatar

# re: ADO.Net Data Services with NHibernate 7/30/2008 4:27 PM Justin DeCourcy

Are ther plans to move NHibernate.Linq the current release version of NHibernate 2.0 (CR1 I think now)? I know there are some major differences between the trunk and 2.0 branch that breaK NHibernate.Linq - are there plans to apply those changes to the release branch? We're using other parts of the NHibernate ecosystem that use the release branch, but I'd like to use Linq & ADO,Net Data Services, too. If there's anything I can do to help let me know.


Gravatar

# re: ADO.Net Data Services with NHibernate 7/30/2008 4:30 PM Ayende Rahien

No, Linq for NH will be released (hopefully) with NH 2.1, not 2.0


Gravatar

# re: ADO.Net Data Services with NHibernate 8/20/2008 5:26 PM fars1d3r

I have been working with the Linq an ADO.Net Data service and have found the translation of the rest query to the Linq syntax needs some work - Can you guide me as to where this translation takes place and I will have a crack at it.


Gravatar

# re: ADO.Net Data Services with NHibernate 8/20/2008 5:42 PM Ayende Rahien

It happens in Linq to NHibernate, discussion of that is in the nh contrib mailing list

Comments have been closed on this topic.