LinqPad can't connect using Entity Developer's typed DbContext

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
Thenrich
Posts: 74
Joined: Sun 21 Dec 2014 19:47

LinqPad can't connect using Entity Developer's typed DbContext

Post by Thenrich » Sun 21 Dec 2014 19:56

I am trying to create a new connection in LinqPad. The wizard asks for the assembly which has the DbContext. I enter the one using Entity Developer DbContext. However testing the connection always fails. I think LinqPad is trying to use an Entity Connection String which Entity Developer doesn't use. I have tried a regular connection string but it didn't work. I tried both constructor options in LinqPad.

If I use the regular edmx designer, LinqPad works fine.

I am guessing I need a special driver because there are drivers from other ORM vendors listed in LinqPad. Is there one from DevArt? Or how do I get LinqPad to work?

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Re: LinqPad can't connect using Entity Developer's typed DbContext

Post by Shalex » Mon 22 Dec 2014 18:10

Please try the following approach with *.edml used in Visual Studio project:
a) enable the DbContext template and set its Fluent Mapping property to True
b) select designer surface and set its Metadata Artifact Processing property to Do Not Generate Mapping Files
c) save the model and rebuild the project
d) an example of an initialization in the Entity Framework DbContext Connection window of LinqPad
Path to Custom Assembly=D:\Projects\ConsoleApplication1\bin\Debug\ConsoleApplication1.exe
Full Type Name of Typed DbContext=TestModel.TestEntities
Via a constructor that accepts a string=Data Source=DBMSSQL\MSSQL2012;Initial Catalog=test;Integrated Security=False;Persist Security Info=True;User ID=sa

Press the Test button, the result should be "Successful". If not, specify the exact text of the error.

Thenrich
Posts: 74
Joined: Sun 21 Dec 2014 19:47

Re: LinqPad can't connect using Entity Developer's typed DbContext

Post by Thenrich » Wed 24 Dec 2014 05:34

It worked! Thanks.

Post Reply