The underlying provider failed on open entity framework

前端 未结 3 1449
走了就别回头了
走了就别回头了 2021-01-20 02:29

I am unsing entity framework in my web application. Earlier everything was working fine. But then I deleted database from Sql Server. After that whenever I run the applicati

3条回答
  •  星月不相逢
    2021-01-20 02:58

    Entity framework will recreate your database on application start assuming the following:

    • You have permission to create databases in SQL
    • A connection string is specified correctly (if it was working before this should be fine)
    • You are using CodeFirst or ModelFirst strategies for databases (ie if you generated an EDMX off an existing database it wont recreate it for you)

提交回复
热议问题