Interviews - C# Corner

Vijayashankar Palanichamy
How to use a table which is not having a Primary Key in entity framework?
By Vijayashankar Palanichamy in .NET onMay 30 2016
  • Vijayashankar Palanichamy
    May, 2016 30

    The Entity framework will not support to have a table without primary key, but we can overcome this issue by accessing the table with additional column via a view and marking the new column as Primary in entity framework.

    • 2
  • yogesh soni
    Jun, 2017 29

    Entity Framework requires primary keys for entities. But we can use the below type of query.var seasons = db.Schedules.SqlQuery("SELECT DISTINCT Season FROM Schedule").TList();

    • 0

Most Popular Companies

Most Popular Job Functions