Removed connectionString in web.config. In IIS, the connection lines are all empty. The code was not explicitly stated anywhere. Through SQL Express closed all connections to the database. But when you start the application, it still connects to it. The question is, how does it do it?

  • Only you can say this. I think, if in your application there will be only Console.WriteLine("hello world"); , the connection to the database will not happen. - VladD
  • @VlaD then how does it understand that you need to connect to this database? Where to edit to connect to another? - m.artamoshkin
  • And what do you pass to the context constructor? And what does he transmit to the base class constructor? .. - Pavel Mayorov
  • 2
    It describes in detail how EF connects to the database and creates the connection string itself depending on the context name. - Vladimir Zhukov

0