Skip to content

CloudNimble/LinqPad.Drivers.EF6Core

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CloudNimble's LINQPad Drivers for EF6 on .NET Core

Build status Release status NuGet

What is this?

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.

Features

  • 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

Dependencies

  • ErikEJ.EntityFramework.SqlServer
  • Microsoft.Data.SqlClient
  • ModernWpfUI
  • SharpVectors.WPF
  • Z.EntityFramework.Plus.EF6

Installation

  1. Open LINQPad 6 or later and click "Add connection" in the connection tree.

  2. In the "Choose Data Context" dialog, select "View more drivers" in the bottom left corner. Choose Data Context

  3. In the "LINQPad NuGet Manager" dialog, select the "Show all drivers" option at the top of the center column.

  4. Search for CloudNimble.LinqPad.Drivers.EF6Core and install it. Installing the Driver

  5. Close the dialog.

Supported DbContexts

Your DbContext must have a public constructor accepting a nameOrConnectionString string as a parameter:

public class MyDbContext : DbContext
{

    public MyDbContext(string nameOrConnectionString) : base(nameOrConnectionString)
    {
    }

}

Configuration

  1. You should now see "EF6 + Microsoft.Data.SqlClient on .NET 6 and later" in the "Choose Data Context" dialog. Select it and click "Next". Selection

  2. You will be presented with the dialog below. Configuration

  3. Start by entering a name for the connection.

  4. Click the first orange "Browse" link and select the assembly containing your DbContext.

  5. Click the second orange "Choose" link and select your DbContext type.

  6. 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.

  7. Click "Test Connection" and observe the results, making changes as necessary.

  8. Click "Create Connection" to complete the process.

Known Issues

  1. The EF6MemberProvider needs further updates to reduce its reliance on Reflection.

Troubleshooting

  1. 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.

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%