Connection string - Keyword not supported: 'initial catalog'

后端 未结 6 1688
北荒
北荒 2020-12-03 10:47

I am using Webmatrix.data\'s Database entity to create a database connection, however it doesnt like my connection string. I am running it from MVC ASP.net.

Ive tri

6条回答
  •  孤街浪徒
    2020-12-03 11:30

    You can use the below code

    Config file :

       
       
      
    

    cshtmlfile :

    var db = Database.Open("con");
    
    var selecteddata = db.Query("select * from movie");
    

提交回复
热议问题