locked
Will Astoria support Linq To SQL for version 1.0? RRS feed

  • Question

  • This is what the main page says:
    ADO.NET Data Services models the data exposed through the data service using a model called the Entity Data Model (EDM), an Entity-Relationship derivative.

    Will there be support for Linq to SQL for version 1.0? If yes, how does developer get to choose which model is used to build the service?

    Thanks!
    Wednesday, January 9, 2008 7:53 PM

Answers

  • We are not planning on providing an implementation of IUpdateable that works over Linq to Sql for Astoria V1.  However, we do have some coding time left - so based on customer input, we could prioritize this support higher on the list of features.

     

    That said, implementing IUpdateable for Linq to Sql is not terribly hard.  In fact, I have already seen some folks talking about this:

     

    http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/default.aspx?p=2

     

    One interesting option is to get a project going on http://www.codeplex.com/ for this support.  We could definitely help out here if anyone was interested.

     

    I will make the disclaimer that we have changed IUpdateable substansilly since the last CTP of Astoria.  Those changes should show up in early spring.   Hence, any implementation over the current IUpdateable will need to be rewritten when the next Astoria CTP is available.

    Thursday, January 10, 2008 9:58 PM
    Moderator

All replies

  • For query, Astoria supports any data source that surfaces public IQueryable<T> entry points.  So as long as the developer follows Astoria’s convention for keys, read-only scenarios work with Linq to Sql including generation of the appropriate EDM metadata at runtime.

     

    CUD operations over Linq to Sql will work also, but will require some code to hook up one’s DataContext CUD API to Astoria by implementing IUpdateable (Astoria’s O/R style CUD interface).

     

    In general, Astoria’s primary support for ADO.Net data providers is via the Entity Framework.  In other words, works out of the box with no additional code needed.  However, I have also got Linq to Objects and Linq To Xml to work as Astoria datasources by hacking up a context object which implements IUpdateable.  I am hoping to get a sample of this available soon.

     

    Thursday, January 10, 2008 5:49 AM
    Moderator
  • In general, Astoria’s primary support for ADO.Net data providers is via the Entity Framework.  In other words, works out of the box with no additional code needed.

    Andy, thank you for the reply. I think your answer has brought me one step closer to where I was before. But, do you think you will also implement LinqTOSQL out of the box, so we could model our system using LinqTOSQL data context? I want to create one DataContext to be used by ASP.Net for web pages and also use the same DataContext with Astoria to support SL clients. But I much rather to see Astoria support that right out of the box than me haking into the system and try to make it work. I have plenty of work ahead of me to write the application than trying to get Astoria working with LinqTOSQL.

    Yes, the applicatioin will do querey and full CRUD! So, do you think by 1.0, Asoria will support LINQToSQL right out of the box?

    Thanks!

    Thursday, January 10, 2008 4:32 PM
  • We are not planning on providing an implementation of IUpdateable that works over Linq to Sql for Astoria V1.  However, we do have some coding time left - so based on customer input, we could prioritize this support higher on the list of features.

     

    That said, implementing IUpdateable for Linq to Sql is not terribly hard.  In fact, I have already seen some folks talking about this:

     

    http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/default.aspx?p=2

     

    One interesting option is to get a project going on http://www.codeplex.com/ for this support.  We could definitely help out here if anyone was interested.

     

    I will make the disclaimer that we have changed IUpdateable substansilly since the last CTP of Astoria.  Those changes should show up in early spring.   Hence, any implementation over the current IUpdateable will need to be rewritten when the next Astoria CTP is available.

    Thursday, January 10, 2008 9:58 PM
    Moderator
  • Adding to Andy's comment we have not written much about IUpdatable so far because it has gone through a fair amount of redesign to enable writing providers for various data sources easier.  In the next drop, we'll support this with much more documentation and snippets to help the initial learning curve. 

     

     

     

    Friday, January 11, 2008 12:33 AM
  • Thanks guys!
    Friday, January 11, 2008 3:03 AM