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.
Any help would be appreciated.
Comments
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!
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 .
http://www.linqpad.net/beta.aspx
I've retrofitted ObjectContext support for EF6. Everything should work except ESQL queries.