Tuesday, September 23, 2008

ADO.NET Data Services + Oracle

Wow - this is wicked cool stuff.

ADO.NET Data Services allow you to expose IQueryable objects as RESTful endpoints in ATOM, POX, and JSON. Here's my brain dump of how cool this can be used for RAD purposes...

ADO.NET Data Services is being plugged as just a endpoint for ADO.NET Entities, and thus just SQL Server's LINQ to SQL implementation. Microsoft themselves are doing most of that damage - but I want to point out how it's much bigger than that!

If you're like me, you have the pleasure (yes, pleasure) of working with Oracle instead of SQL Server. Many times this leaves you feeling high and dry with all this cool new LINQ stuff. There is no realy good LINQ to Oracle implementation out there - but the team at NHibernate has come to the rescue.

NHibernate is a .NET port of the years old Java Hibernate project - providing ORM for your software. The importance of this framework in the RAD world is big - it allows you to very easily map a database to objects.

LINQ to NHibernate is almost a year old now, and is in the process of being implemented in the main trunk of NHibernate (currently it's there, but throws a NotImplementedException after mocking you by showing you the SQL it knows that it should use). However, in the NContrib trunk, I have found a quite functional version of LINQ to NHibernate!

Why do I bring this up? Because some kind people in the project have even gone so far as to implement the System.Data.Services.IUpdateable interface within the LINQ.NHibernate project. This means fully functional ADO.NET Data Services for your Oracle database.

With only a couple lines of code, you can expose your NHibernate objects as queryable JSON, ATOM, POX RESTful services. Simply extend NHibernateContext, provide a ProvideSession() implementation, and expose public IQueryable properties on your object. Use this class as the type parameter of a new System.Data.Services.DataService class, and you'll be all set.

ADO.NET data services provides the RESTful interface which is flexible enough to pass pagnation, ordering, filtering, etc straight through the web layer to the database layer. So a javascript request for:

http://server/someobject?$filter=someid eq '1'&$orderby=somefield

produces SQL sent straight to Oracle of

select *
from someobject
where someid = 1
order by somefield

It's also fully updatable (through the IUpdateable implementation) which means that POST, PUT, DELETE requests work in a similar fashion.  It provides it in a JSON format, allowing you to use your database tables as javascript collections.... wow... Again, the RAD implications are huge.

The only issue that I have is with performance - NHibernate doesn't seem to stream resultsets (instead building the object array all at once), and the wordy ATOM/JSON formats don't suit some applications. ADO.NET Data Services is NOT pluggable with custom serialization - I've decompiled and searched for an entry point for literally DAYS.

One other point to make, is that referencing these new data services from VS2008 SP1 provides you with a client side LINQ object which translates linq queries to filtered HTTP requests (as in the filter/order/etc format above, which then translates to SQL... So, cool.

I'd provide some detailed examples and implementations - but that'd ruin all the fun ;)

121 comments:

Chris Hemsworth said...

The article is so informative. This is more helpful for our
best software testing training in chennai
best software testing training institute in chennai with placement
software testing training
courses

software testing training and placement
software testing training online
software testing class
software testing classes in chennai
best software testing courses in chennai
automation testing courses in chennai
Thanks for sharing.

mano karan said...

Nice post.. Really you are done a wonderful job. Thanks for sharing such wonderful information with us. Please keep on updating...
Best C & C++ Course Training Institute in kanchipuram|

sandhiya said...

Very nice post here and thanks for it .I always like and such a super blog of these post.Excellent and very cool idea and great blog of different kinds of the valuable information's.
Best Tally Erp 9.0 Course Training Institute in kanchipuram|

karthik said...

Interesting post!!! Thanks for posting such a useful information. I wish to read your upcoming post to enhance my skill set and keep blogging.
Best Tally Erp 9.0 Course Training Institute in kanchipuram|

rajinikumar said...

This is excellent information. It is amazing and wonderful to visit your

site.Thanks for sharing this information, this is useful to me.
Best Selenium

Automation Course Training Institute in kanchipuram
|

bharathidasan said...

I have read your blog. Good and more information useful for me, Thanks for sharing this information keep it up....
Best Dot Net Course Training Institute in kanchipuram|

sandhiya said...

Really it was an awesome blog...very interesting to read..You have provided an nice information....Thanks for sharing..
Best Hardware & Networking Course Training Institute in kanchipuram|

karthik said...

Thanks for sharing in this blog...its very useful for us...keep on going...
Best MS Office Course Training Institute in kanchipuram|

mano karan said...

Nice blog. Thank you for sharing. The information you shared is very effective for learners I have got some important suggestions from it.
Best PCB (Printed Circuit Board) Course Training Institute in kanchipuram|

Renuka capure said...

very nice blogs!!! i have to learning for lot of information for this sites...Sharing for wonderful information. Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing…
No:1
Python Training Academy in kanchipuram

Renuka capure said...

very nice blogs!!! i have to learning for lot of information for this sites...Sharing for wonderful information. Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing…
No:1
Python Training Academy in kanchipuram

Renuka capure said...

very nice blogs!!! i have to learning for lot of information for this sites...Sharing for wonderful information. Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing…
No:1
Python Training Academy in kanchipuram

Renuka capure said...

very nice blogs!!! i have to learning for lot of information for this sites...Sharing for wonderful information. Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing…
No:1
Python Training Academy in kanchipuram

Renuka capure said...

very nice blogs!!! i have to learning for lot of information for this sites...Sharing for wonderful information. Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing…
No:1
Python Training Academy in kanchipuram

roshlin said...

Nice blog. Thank you for sharing. The information you shared is very effective for learners I have got some important suggestions from it.
No:1 Tally Training Academy in Kanchipuram

rajinikumar said...

Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.
Best PCB (Printed Circuit Board) Course Training Institute in kanchipuram|

sindhu sree said...

Nice blog. Thank you for sharing. The information you shared is very effective for learners I have got some important suggestions from it.
No:1 Hardware and Networking Training Academy in Kanchipuram

sandhiya said...

Awesome post. Really you are shared very informative information... Thank you for sharing. Keep on updating...
Best AWS (Advanced Amazon Web Services) Course Training Institute in kanchipuram|

karthik said...

Great post..Its very useful for me to understand the information..Keep on blogging..
Best Software Testing Course Training Institute in kanchipuram|

mano karan said...

I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly.
Best Cloud Computing Course Training Institute in kanchipuram|

janaki devi said...

Nice..You have clearly explained about the conept..Its very useful for me to
undertand..Keep on sharing..

No:1Tally Training Academy in Kanchipuram







janaki devi said...

Nice..You have clearly explained about the conept..Its very useful for me to
undertand..Keep on sharing..

No:1Tally Training Academy in Kanchipuram







bharathidasan said...

I found some useful information in your blog, it was awesome to read, thanks for sharing this great information to my vision, keep sharing.
Best Graphic Designing Course Training Institute in kanchipuram|

sandhiya said...

Marvelous and fascinating information.Thanks for this greatful blog. keep your blog updated.
Best Hardware & Networking Course Training Institute in kanchipuram|

Malar said...

This is really awesome. Full of knowledge and latest information.Thanks for sharing.
Best JAVA / J2EE / J2ME Course Training Institute in kanchipuram|

suresh said...

great and nice blog thanks sharing..I just want to say that all the information you have given here is awesome...Thank you very much for this one.
No:1 Best EEE Project Center in kanchipuram|

bharathidasan said...

really you have posted an informative blog. it will be really helpful to many peoples. thank you for sharing this blog. so keep on sharing such kind of useful blogs.
No:1 Best NS2 (Network Simulator) Project Center in kanchipuram|

sandhiya said...

very usefull informatation.and iam expecting more posts like this please keep updating us....
No:1 Best Android Project Center in kanchipuram|

LHi Lab said...

Its a great pleasure reading your post. Its full of information I am looking for and I love to post a comment. Get the best and detailed conversion optimization services Minneapolis for more information.

janaki devi said...

This is excellent information. It is amazing and wonderful to visit your site.Thanks

for sharing this information, this is useful to me…

No:1Mobile computing Training Center in Kanchipuram









rajinikumar said...

Thanks for this greatful information. all this information is very important to all the users and can be used good at all this process.please keep on updating..
No:1 Best ECE ( Electronics & Communications Engineering) Project Center in kanchipuram|

sindhu sree said...

This is excellent information. It is amazing and wonderful to visit your site.Thanks

for sharing this information, this is useful to me…

No:1Robotics project Center in Kanchipuram









mano karan said...

You post explain everything in detail and it was very interesting to read.Thank you for Sharing.
No:1 Best Dotnet Project Center in kanchipuram|

karthik said...

After I see your blog it was so impressive and informative content. thanks for sharing such a lovely blog.
No:1 Best Software Testing Training Center in kanchipuram|

roshlin said...

this is really too useful and have more ideas from yours. keep sharing many
techniques.

No:1TCA training Center in Kanchipuram









hanshika said...

It is really a great and useful piece of information. I am glad that you shared this helpful info with us. Please keep us up to date like this. Thank you for sharing.
Basic Computer Course in kanchipuram

Malar said...

This was a worthy blog. I enjoyed reading this blog and got an idea about it. Keep sharing more like this.
No:1 Best PGDCA Training Center in kanchipuram|

suresh said...

Wow it is really wonderful and awesome thus it is very much useful for me to understand many information and helped me a lot. it is really explainable very well and i got more information from your blog.
No:1 Best Tally Training Center in kanchipuram|

sindhu sree said...

this is really too useful and have more ideas from yours. keep sharing many
techniques.

No:1 CCNA training Center in Kanchipuram









karthik said...

The best thing is that your blog really informative thanks for your great information!No:1 ISTQB Exam Center in Chennai|

mano karan said...

This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharng this information,this is useful to me..No: 1 ITB Exam Center in Chennai|

suresh said...


Your blog is awesome..You have clearly explained about it ...Its very useful for me to know about new things..Keep on blogging…No: 1 ECE Project Center in Chennai|

bharathidasan said...

I just see the post i am so happy the post of information's.So I have really enjoyed and reading your blogs for these posts. No: 1 BCS Exam Center in Chennai

Malar said...

These provided information was really so nice,thanks for giving that post and the more skills to develop after refer that post. Your blog really impressed for me,because of all information so nice.No: 1 VLSI Project Center in Chennai|

Atmajakan said...

I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly.No: 1 ITIL Exam Center in Chennai|

danieljon said...

This blog is informative.It helps me to gain good knowledge.It helps to understand the concept easily. please update this kind of information…No: 1 IT Project Center in Chennai|

mano karan said...

I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly.No: 1 PMP Exam Center in Chennai|

bharathidasan said...

hi welcome to this blog. really you have post an informative blog. it will be really helpful to many peoples. thank you for sharing this blog.No: 1 Final Year Project Center in Chennai|

suresh said...

Good one, it is very useful for me to learn and understand, thanks for sharing your information and ideas.. keep rocks..No: 1 AWS Exam Center in Chennai|

Alwin Co Daan said...

Great Article. Thank you for sharing! Really an awesome post for every one.
Project Centers in Chennai

JavaScript Training in Chennai

Final Year Project Domains for IT

JavaScript Training in Chennai

karthik said...


I am really happy with your blog because your blog is very unique and powerful for new reader.No: 1 Microsoft Exam Center in Chennai|

janaki devi said...

Its really an Excellent post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog. Thanks for sharing.
No:1 Dotnet Project Center in chennai










sandhiya said...

Thanks for sharing such a nice blog. Its so informative concept and easy to understand also, kindly keep updating such a nice blog..No: 1 Engineering Project Center in Chennai|

karlie said...


I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly. 
No: 1 AZURE Exam Center in Chennai|

mano karan said...

Really an amazing post..! By reading your blog post i gained more information.No: 1 CCNA Exam Center in Chennai|

lingerie pre said...


I have read your blog its very attractive and impressive. I like it your blog.No: 1 Python Certification in Chennai|

sandhiya said...

Thanks for posting this useful content, Good to know about new things here, Keep updating your blog...No: 1 Blue Prium Certification in Chennai|

janaki devi said...

https://www.crmonce.com/2013/10/sap-crm-interview-questions-and-answers.html?showComment=1571402663770#c3873919702359346167

suresh said...

Hi, am a big follower of your blog. The best thing is that your blog really informative thanks for your great information!No: 1 NS 2 Project Center in Chennai|

bharathidasan said...

Hello , Really awesome blog. Your blog is really useful for me. Thanks for sharing this informative blog. Keep updating your blog.No: 1 JAVA Application Center in Chennai|

Malar said...


These provided information was really so nice,thanks for giving that post and the more skills to develop after refer that post. Your bolg really impressed for me,because of all information so nice.No: 1 NS 2 Project Center in Chennai|

karthik said...

I found a lot of interesting information here. A really good post. keep updating.No: 1 MBA Project Center in Chennai|

bharathidasan said...

Quite Interesting post!!! Thanks for posting such a useful post. I wish to read your upcoming post to enhance my skill set, keep blogging.No: 1 BBA Project Center in Chennai|

janaki devi said...

Nice Post! It is really interesting to read from the

beginning & I would like to share your blog to my

circles, keep your blog as updated.
No.1 CCNA Training Center In Kanchipuram

Malar said...

Great post. Wonderful information and really very much useful. Thanks for sharing and keep updating.No: 1 MBA Project Center in Chennai|

mano karan said...

Very nice blog. It is very useful for me. I read your blog completely. I gather lot of information in this post. Thanks for sharing. No: 1 BBA Project Center in Chennai |

karthik said...

Wonderful post with great piece of information. I'm learning a lot from your blog. Keep sharing. No: 1 CCNA Training Center in Kanchipuram|

Atmajakan said...

Thanks for giving great kind of information. Thanks for your excellent blog, nice work keep it up thanks for sharing the knowledge. No: 1 Graphic Designing Course in Kanchipuram|

Renuka capure said...

Thanks for making me this Blog. You have done a great job by sharing this content here. Keep writing blog like this
MBA Project Center in Kanchipuram

suresh said...

Your Blog is really amazing with smart and unique content..Its very useful to everyone to understand the information clearly.. No: 1 CCNA Training Center in Kanchipuram|

roshlin said...

What a fantastic blog you should written in well manner.Iam really happy to read this
blog.Thanks for sharing.keep sharing more blogs.
No.1 Tally Training Institute In Kanchipuram

Benjamin jan said...

Very nice post here and thanks for it .I always like and such a super blog of these post.Excellent and very cool idea and great blog of different kinds of the valuable information's. No: 1 IOS Training Center in Kanchipuram|

ram raghu said...

Congratulations guys, quality information you have given!!!..Its really useful blog. Thanks for sharing this useful information.
No.1 Selenium Training Center In Kanchipuram

mano karan said...

Well Said, you have furnished the right information that will be useful to anyone at all time... No: 1 Tally Erp 9.0 Training Center in Kanchipuram|

mythili s said...

I found a lot of interesting information here. A really good post. keep updating.
ISTQB Certification Academy in Kanchipuram

janaki devi said...


This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information, this is useful to me…
Machine Learning Training Center In Chennai

sandhiya said...

I really love reading and following your post as I find them extremely informative and interesting. This post is equally informative as well as interesting. No: 1 Data Science Training Center in Chennai|

Dhilip Kumar said...

Awesome Post!!! With unique content, I really get interest to read this post. I hope this article help many of them who looking this pretty information.
No.1 Android Training institute in Kanchipuram

suresh said...

Very happy to see this blog. Gives a wonderful information with coded explanation. Thank you for this blog. very useful to me. No: 1 JAVA Training Institute in Kanchipuram|

sandhiya said...

Very nice post here and thanks for it .I always like and such a super blog of these post.Excellent and very cool idea and great blog of different kinds of the valuable information's. No: 1 .Net Training Institute in Kanchipuram|

sindhu sree said...


Thanks for your informative blog.Your post helped me to understand the future and career prospects. Keep on updating your blog with such awesome blog.
Final years student project In Chennai

mano karan said...


Thanks for sharing this unique and informative post. This blog which provided me the required information No: 1 Academic Project in Chennai|

isaiah han said...

I am following your blog from the beginning, it was so distinct & I had a chance to collect conglomeration of information that helps me a lot to improvise myself. I hope this will help many readers who are in need of this vital piece of information. Thanks for sharing & keep your blog updated. No: 1 Blue Prism Training Institute in Chennai|

janaki devi said...

Very nice post here and thanks for it .I always like and such a super blog of these post.Excellent and very cool idea and great blog of different kinds of the valuable information's.Best Ethical Hacking Training institute in Kanchipuram|

jeffery said...

your blog contain very useful information. Really hereafter I am very big follower of your blog.. No: 1 Best Photoshop in Kanchipuram|

adriana lima said...

Awesome Post! I like writing style, how you describing the topics throughout the post. I hope many web reader will keep reading your post at the end, Thanks for sharing your view. No: 1 Best Corel Draw in Kanchipuram|

karlie said...

Thanks for sharing such a nice blog. Its so informative concept and easy to understand also, kindly keep updating such a nice blog.. No: 1 Tally Training Institute in Kanchipuram|

Gisele Bundchen said...

I have read all the articles in your blog; was really impressed after reading it.Thanks for giving nice information from your blog.. No: 1 Advanced MATLAB Course in Kanchipuram|

mano karan said...

your way of expressing views and ideas are really awesome. thus it is exclusive and very much interesting. i like your encryption and thanks a lot. No: 1 Best CLOUD COMPUTING Training Institute in Kanchipuram|

Malar said...


I wondered upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon. No: 1 Linux Certification in Kanchipuram|

suresh said...

Thank you for sharing in this information. can learn a lot and could also be a reference, I hope to read the next your blog updates. No: 1 Software Testing Certification in Kanchipuram|

bharathidasan said...


I ever had seen this information over the blog sites; actually I am looking forward for this information. Here I had an opportunity to read, it was crystal clear keep sharing…I have an expectation about your upcoming post.
Regards, No: 1 Adobe Photoshop Training Institute in Kanchipuram|

karthik said...

Great post. This blog is really very interesting and enjoyable. I think it’s must be helpful and informative for us. Thanks for sharing your nice post. No: Adobe Photoshop Training Institute in Chennai

karlie said...


I really enjoyed while reading your blog, the information you have delivered in this post was damn good. Keep sharing your post with efficient news.Regards, No: 1 Adobe Illustrator Training Institute in Kanchipuram|

mano karan said...

Thank you for sharing the information here. Its much informative and really i got some valid information. You had posted the amazing blog. No: 1 Adobe InDesign Training Institute in Kanchipuram|

sindhu sree said...

What a fantastic blog you should written in well manner .I am really happy to read this
blog. Thanks for sharing .keep sharing more blogs.
No.1 CCNA Training Institute In Kanchipuram

franklin fie said...

great blog, you have provided the right information that will be beneficial to somebody at all time. Thanks for sharing such valuable Ideas to our vision. No: 1 Adobe Illustrator Training Institute in Kanchipuram|

karinakapoor said...

I’m sincerely suggesting your blog.nice and really helpful information to everyone... thanks for sharing
Web Designing Training Institute in Chennai

Neil said...

Good blog. I gained more information about your post. keep updating. Best After Effects Training Institute in Kanchipuram|

bharathidasan said...

Very nice post here and thanks for it .I always like and such a super blog of these post.Excellent and very cool idea and great blog of different kinds of the valuable information's.Keep Sharing Best Adobe Premier Pro Training Institute in Kanchipuram|

sindhu sree said...


information to our vision. You have posted a trust worthy blog keep sharing....
No.1 PHP project center In kanchipuram

rajinikumar said...

I really enjoyed by reading your blog post.I too always learn something new from your post.. Best Adobe Photoshop Training Institute in Kanchipuram|

sindhu sree said...

The information you shared is very effective for learners. I learnt this technology very well with the help of this article.Thanks for this useful

information.Keep updating.
Best Tally Training Institute in Chennai









ram raghu said...

Wow it is really wonderful and awesome thus it is very much useful for me to understand many information and helped me a lot. it is really explainable very well and i got more information from your blog.
Best PHP Training Institute in Kanchipuram



Narmatha ss said...

Great blog.you put Good stuff.All the topics were explained briefly.so quickly understand for me.I am waiting for your next fantastic blog.Thanks for sharing.
Selenium Certification Courses in Kanchipuram

roja sangeetha said...

I have read your blog. Good and more information useful for me, Thanks for sharing this information keep it up....
Best VLSI project center in Chennai

roja sangeetha said...

Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge.
Best VLSI project center in kanchipuram

bharathi sree said...

The best thing is that your blog really informative thanks for your great information!
Best Data mining project center in kanchipuram

bharathi sree said...

This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information, this is useful to me…
Best Android project center in kanchipuram

ram raghu said...

great doing. and i happy to visit your blog to know about this wonderful information. thanks for sharing. keep updating.
Best Robotics project center in chennai








bharathidasan said...

great blog, you have provided the right information that will be beneficial to somebody at all time. Thanks for sharing such valuable Ideas to our vision. Best Premier Pro Training Institute in Kanchipuram|

sindhu sree said...

Nice..You have clearly explained about the conept..Its very useful for

me to undertand..Keep on sharing..
Best Robotics project

center in kanchipuram






sindhu sree said...

You have done a great job, really the concept of big data was superb, its

very interesting and easy to understand also.. Keep updating such a nice

blog..
Best MATLAB Training institute in Chennai








janaki devi said...

Nice blog…. with lovely information. Really very useful article for us thanks for sharing such a wonderful blog. Keep updating…..
Best HTML Training institute in kanchipuram

rajinikumar said...


Thanks for this greatful information. all this information is very important to all the users and can be used good at all this process.please keep on updating.. Best RHCE Training Institute in Kanchipuram|

bharathi sree said...

Very impressive and informative blog.. thanks for sharing your valuable

information.. it is very useful and easy to learn as well... keep rocking

and updating... looking further..
Best

CCNP Training institute in kanchipuram

mano karan said...


Thanks you for sharing this unique useful information content with us. Really awesome work. keep on blogging. Best Advanced MATLAB Course in Kanchipuram|

janaki devi said...

very nice blogs!!! I have to learning for lot of information for this

sites...Sharing for wonderful information. Thanks for sharing this

valuable information to our vision. You have posted a trust worthy blog

keep sharing.
Best

Advanced JAVA cource in kanchipuram









karthik said...

I wondered upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon… Best PCB Course in Kanchipuram|

ram raghu said...

very nice blogs!!! I have to learning for lot of information for this sites...Sharing for wonderful information. Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.
Best Advanced Ethical Hacking cource in kanchipuram








sindhu sree said...

Very interesting blog which helps me to get the in depth knowledge about the technology, Thanks for sharing such a nice blog...
Best Android Training Institute in chennai