问题
I'm using LINQPad v4.51.03 and attempting to create a DbContext connection from a code-first implementation in Entity Framework 6.0 (6.1.1).
public partial class MyEntities : DbContext
{
public MyEntities() : base("mydbname") { ...
The connection string looks like:
<add name="mydbname" connectionString="Data Source=<db>;initial catalog=<cat>;integrated security=True;multipleactiveresultsets=True;application name=EntityFramework" providerName="System.Data.EntityClient" />
In the LINQPad 'Add connection' wizard everything seems to set up correctly when attempting to create a DbContext connection (using the parameter-less constructor) until I click test, at which point I receive the following error: "Error: Keyword not supported: 'data source'".
I'm guessing EF 6.0 no longer supports that type of connection string (even though it still works). How would I create the LINQPad connection for code-first implementations?
来源:https://stackoverflow.com/questions/27627215/issue-creating-dbcontext-connection-with-linqpad-using-entity-framework-6-0-code