I am trying to create DBcontext and corresponding model for a particular table in ASP.NET core MVC application. This table doesn't have any primary key.
I am running following Scaffold-DbContext command-
Scaffold-DbContext "Server=XXXXX;Database=XXXXXXX;User Id=XXXXXXX;password=XXXXXXX" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -t TABLE_NAME -force -verbose
In Package Manager Console, I can see this verbose output-
...............
...............
Unable to identify the primary key for table 'dbo.TABLE_NAME'.
Unable to generate entity type for table 'dbo.TABLE_NAME'.
My Environment is - VS2015 update3, .NET core 1.0.0, ASP.NET MVC core application.
Is there anyway to create a model for a table without primary key?