I'd like to see sample code and get learnings from anyone who has experience with using Linq to SQL from within a SQL-CLR stored procedure.
The end-goal is to have stored procedures and views on my SQL 2005 box that can query SharePoint 2010 lists effortlessly.
This kind of solution would get me:
o Datastructure agnosticism -- the linq syntax could be set up to select * from the list, so that any column additions or deletions inside SharePoint would not affect my sp's or views.
o No dealing with the weird table structures in SharePoint's SQL back-end that house its list data. No having to use ; know GUIDs or whatever IDs to access the list data.
o Reusable -- could pass in the name of my list to the SQL-CLR procedure. No hard-coding list names or column names.
o No third-party tools.
I see how Linq to SharePoint works. There are examples all over the web. And I know SQL CLR. But I do *not* see anyone doing Linq to SharePoint within SQL-CLR...which seems to me to be the only way to achieve all these goals.
Thanks for sharing your experience.