Entity Framework 6 Support in LINQPad

I've seen a post on the LINQPad Facebook page that mentions EF 6 is supported with the latest build, but everytime I attempt to add a connection using the Entity Framework (Object Context) driver, I get an error message saying "There are no types based on 'System.Data.Objects.ObjectContext' in that assembly." I know the namespace has changed with EF 6 which makes me wonder if its actually supported or not.

Any help would be appreciated.

Comments

  • edited November 2013
    ObjectContext-based models are no longer supported in LINQPad with EF6. I didn't think anyone used these anymore.
  • I updated the app to EF 6 and now the SQL tab is not showing the sql. Is linqpad not able to do this yet? If not, when can we expect it to?
  • The v4.47.03 beta fixes this: www.linqpad.net/beta.aspx
  • Thanks for the response Joe. As I just moved from EF 4 to EF 6, I'm a little behind the times with this stuff. I converted my project to using DbContext and everything is up and running in LINQPad now. Thanks again.
  • Is this something that is difficult to support, or just something that didn't seem necessary? We have a project with a large model (300 or so tables) that was originally written in EF1. By the time DBContext came around it would have been a major undertaking to migrate it away from ObjectContext. It's now happily running under EF6, but having just been assigned to do some work on it I find that I'm unable to use LinqPad any more.
  • Yes, it's difficult to support. I could retrofit support if there's enough demand, but this will be unlikely given that ObjectContext is dying.

    The reason for the difficulty is that LINQPad connects to EF only via Reflection and Reflection.Emit, so that it can talk reliably to multiple versions of EF. And Reflection.Emit is serious work!
  • Yes, I agree about the likely future of ObjectContext. I've already flagged it as a risk going forward, but appetite for funding the migration work is non-existent. Oh well, guess we're stuck without linqpad support for the moment on this project - at least it's the only project still using it
  • We would also like to have support for EF6 and ObjectContext, since we also have a project which wont be migrated to DBContext. We use LinqPad on a daily basis so its really unfortunate that LinqPad lacks support for objectContext using EF6.
  • Another vote for Object Context support
  • + 1 for EF6 + ObjectContext

    I really don't see how this should be very difficult, it should only be a matter of finding namespace usages and make sure that it emits either the EF4-5 names or EF6 names based on which assembly the used ObjectContext lives in.

    See http://msdn.microsoft.com/en-US/data/upgradeEF6 for the list of namespace Changes.

    @JoeAlbahari, I dont agree with you that ObjectContext is dying (at least not yet), it is not marked obsolete and it received most of the new features in EF6 including async support and I have never seen any microsoft offical/EF developer say that they will stop supporting it in the near future or that everyone should start moving their existing applications from ObjectContext to DbContext.

    Yes they do recommend using DbContext for new implementations, and it has received much focus in order to get it to a state where it should be able to be used instead of ObjectContext and it will (probably) continue to receive focus. The main problem with ObjectContext right now is that since the spotlight is on the shiny new DbContext more developers/libraries (and in this case tools) begin to neglect objectcontext it in order to focus on the new DbContext .
  • Another vote. I'm seriously considering downgrading to EF5 because of this...
  • Try the latest beta:
    http://www.linqpad.net/beta.aspx

    I've retrofitted ObjectContext support for EF6. Everything should work except ESQL queries.
  • Wonderfull, works like a charm again
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!