Link to home
Start Free TrialLog in
Avatar of FaheemAhmadGul
FaheemAhmadGulFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Connection String for LocalDB in EntityFrameCore in an ASP.NET Core 2 Project

In a simple ASP.NET Core 2 Application in which I am using CodeFirst, I am trying to run Update-Database command in PackageManger Console Window (an InitialMigratio has already been created successfully). However I get the followin error.
Keyword not supported: 'mulitpleactiveresultsets'.
I suspect there is probably some erroy in my Connection String in my appsettings.json file.
The ConnectionString I have in appsettings.json file currently looks like this.

 "ConnectionStrings": {
    "Default": "Server=(localdb)\\mssqllocaldb;Database=Webroute;Trusted_Connection=True;MulitpleActiveResultSets=true"
  },

I would appreciate if could let me know if there is any error in the way I have defined the connection string and if the ConnectionString is correct what could the cause of the error message (Keyword not supported: 'mulitpleactiveresultsets'.) I am getting and how could I fix this.
Thank you for your help.

The complet appsettings.json file in my project looks like this:
{

 "ConnectionStrings": {
    "Default": "Server=(localdb)\\mssqllocaldb;Database=Webroute;Trusted_Connection=True;MulitpleActiveResultSets=true"
  },
  
  "Logging": {
    "IncludeScopes": false,
    "LogLevel": {
      "Default": "Warning"
    }
  }
}

Open in new window

Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

For connection string related issues always refer -

ConnectionStrings.com

A very effective site..
ASKER CERTIFIED SOLUTION
Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial