I'm trying to make an ASP.NET Core application that uses LINQ-to-SQL and, preferably, uses a tool to generate the classes. I've followed the steps of different tutorials like https://code.msdn.microsoft.com/How-to-using-Entity-1464feea and whenever I run Scaffold-DbContext
I get a data context generated but no entities. Instead I get the error
// Unable to generate entity type for table 'dbo.MyTable'. Please see the warning messages.
for every one of my tables. There's nothing "weird" about my database, and the warning messages don't exist. Therefore I'm wondering if there's an alternative way to generate the entities.
Scaffold-DbContext要求您的表具有主键!
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.