Question: I tried to solve this with logarithm rules:

O(n^2) = 2^O(log(n^2)) 

c\*n^2 = 2^log(n^2c)

Im not sure that is true?

Answer: 
As explained in other answers, the problem usually comes from having the wrong Initial project in Package Manager Console.
In my case the console was ignoring the value I selected in the Default Project drop down list, and also the `-StartUpProjectName` parameter, and reproducing the wrong behavior of trying to connect to some default database engine, as Mikk's answer describes, in my case using a SqlExpress engine.

My problem was caused by a wrong solution configuration: if your solution has several projects and is meant to be run with the configuration option "Multiple startup projects", but you just downloaded it from your source code control repository, then it is possible that the default configuration option "Single startup project" is being applied to the solution (this config value usually is not checked-in in the source code control). In this case the Package Manager Console just ignores the startup project selected in its combo and just applies the default startup project in the solution, which may not have a connection string, as specified in Mikk's answer.

So I fixed it by changing the solution properties: `Common properties` / `Startup project` / Select `Multiple startup projects` instead of `Single startup project`, and after that the Package Manager Console would accept the Project name and update the right database.
```
PM>Update-Database

```

error and solution which I did today in 4 hours.
I am very much new in .net coding, but yes in PHP I have 10+ years experience.
It took me 4 hours to solve this.
1.My `first Mistake:` I was not having Microsoft SQL Server 2019 in my laptop locally I was having this through AZURE which is not works for localhost, so I installed this locally after download, it took around 2 Hours.
2.Second changed mistake=

```
 "DevConnection": "Server=localhost;Database=PaymentDetailDB;Trusted_Connection=True;MultipleActiveResultSets=True;"

```

then it works for me

[![Error](https://i.stack.imgur.com/o27EE.png)](https://i.stack.imgur.com/o27EE.png)

[![Error solution](https://i.stack.imgur.com/BUu02.png)](https://i.stack.imgur.com/BUu02.png)

[![Error solved](https://i.stack.imgur.com/AZNnU.png)](https://i.stack.imgur.com/AZNnU.png)
[![After error solved database](https://i.stack.imgur.com/eJzul.png)](https://i.stack.imgur.com/eJzul.png)