Error creating ASP.Net Core 2.0 database - Keyword not supported: 'initial Catalog

Asked

Viewed 636 times

2

Hello, I am trying to create a database with SQL Server using the Entity Framework Core, but this presenting the following error:

Keyword not supported: 'initial Catalog'.

Does anyone know what it can be?

 {
  "ConnectionStrings": {
    "DefaultConnection": "Data Source=DESKTOP-DVLQUI3/SQLEXPRESS;Initial Catalog=Tarefas;Integrated Security=True"
  },
  "Logging": {
    "IncludeScopes": false,
    "LogLevel": {
      "Default": "Warning"
    }
  }
}
  • Initial Catalog is not a supported keyword ?!?!?!

2 answers

0

Hello, Use this connectionStrings format by changing to your database:

{
  "ConnectionStrings": {
    "Default": "Server=(LocalDB)\\MSSQLLocalDB;AttachDbFilename=C:\\Users\\usuario\\Documents\\database.mdf; Trusted_Connection=True; MultipleActiveResultSets=true"
  }
}

0

Change Initial Catalog= for Database=.

Source: here

Browser other questions tagged

You are not signed in. Login or sign up in order to post.