I have this code :
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
base.OnConfiguring(optionsBuilder);
optionsBuilder.UseSqlServer("MyConnectionString"); //Exception here
}
At runtime I get an exception :
Error CS0012: The type 'DBConenction' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Common, version=4.1.0.0
I tried to upgrade all packages, add a reference to System.Data.Common 4.1.0.0 I tried higher version too with the same result. I tried with .NET Core 2.0 finalpreview1 I get the same problem. I tried several solution found on the web but without success.
Any idea ?
Thanks,
Read the following documentation and be sure to install all the packages mentioned: