The team at BurnRate.io leverages EF6 and Microsoft.Data.SqlClient to power our game-changing tools for scaling companies. We use LINQPad for testing out our services and Blazor apps, as well as prototyping new features.
But the existing EF6 drivers don't support Microsoft.Data.SqlClient.
So we built our own.
This version takes a simpler approach to EF6 support that takes advantage of our extensive experience with EF metadata to provide a more robust experience.
- Uses Microsoft.Data.SqlClient without metadata changes
- Uses the very latest dependencies that avoid Azure vulnerabilities
- Faster schema loading
- Multiple EntityContainer support
- Correctly labels primary and foreign key relationships
- Improved connection experience with built-in connection testing
- Updated connection icons
- Demonstrates advanced XAML techniques for LINQPad drivers
- Supports LINQPad 6 and later
- ErikEJ.EntityFramework.SqlServer
- Microsoft.Data.SqlClient
- ModernWpfUI
- SharpVectors.WPF
- Z.EntityFramework.Plus.EF6
-
Open LINQPad 6 or later and click "Add connection" in the connection tree.
-
In the "Choose Data Context" dialog, select "View more drivers" in the bottom left corner.
-
In the "LINQPad NuGet Manager" dialog, select the "Show all drivers" option at the top of the center column.
-
Search for CloudNimble.LinqPad.Drivers.EF6Core and install it.
-
Close the dialog.
Your DbContext must have a public constructor accepting a nameOrConnectionString
string as a parameter:
public class MyDbContext : DbContext
{
public MyDbContext(string nameOrConnectionString) : base(nameOrConnectionString)
{
}
}
-
You should now see "EF6 + Microsoft.Data.SqlClient on .NET 6 and later" in the "Choose Data Context" dialog. Select it and click "Next".
-
Start by entering a name for the connection.
-
Click the first orange "Browse" link and select the assembly containing your DbContext.
-
Click the second orange "Choose" link and select your DbContext type.
-
Either select your appSettings.json file or an app.config file in the third orange "Browse" link, or enter a connection string directly in the fourth textbox.
-
Click "Test Connection" and observe the results, making changes as necessary.
-
Click "Create Connection" to complete the process.
- The
EF6MemberProvider
needs further updates to reduce its reliance on Reflection.
- If you're using a configuration file and you get an error that says "The connection string '[SomeName]' cannot be found", try switching to using a raw connection string instead.