简体   繁体   中英

Adding model with Entity Framework

I was watching and trying to add model with Entity Framework (using a SQL Server database). In this step, I couldn't select the third one. I searched this problem but I didn't find a solution. I removed SQL Server and tried again but never changed (my connection is successful).

How can I fix it?

图片在这里

You have no stored procedures or functions checked in your "Which database objects do you want to include in your model?" box, so it makes sense you don't get this option.

The fact you can't select any (hence no dropdown next to the checkbox) probably means you either have none in your database or not the proper rights. Check your database if the objects are present and if they are, if the user you are connecting with from the application has sufficient privileges on them. If you are using sql server you should be able to use SQL Server Management Studio for this.

This answer to a similar question explains in detail how to check the rights.

if any one has this problem: The problem was only with the table. You have to use primary key in your database table.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM