ADO.NET Entity Framework: Update Wizard will not add tables

后端 未结 13 1429
陌清茗
陌清茗 2020-12-13 11:55

I added a new ADO.Net Entity Data Model into my project and used the Update Wizard to add tables into the model. Five of the selected tables were added to the design surfac

13条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-13 12:14

    I had this problem too, all the above didn't work for me. What helped for me was the following.

    When you try to connect with a database that database can have different users with different credentials it can accept. Let's say user A till D.

    If you try to connect with a user make sure that user has the right credentials enabled, in this case, read and write options enabled.

    To do this start MS SQL Server Managment Studio, connected with your SQL server and select the database you try to make a connection with in visual studio. Under 'your_dbname' --> Security --> Users you find a list of users. Rightclick the username you try to login with and select properties. A window opens. Select the 'General' (selected by default) page and under tab 'Database role membership' make sure 'db_datareader' and 'db_datawrite' are selected.

    Note: When you log in too MS SQL Server Managment Studio make sure you log in with a user which can enable/disable these options...

提交回复
热议问题