2
Reply

How to use a table which is not having a Primary Key in entity framework?

VIJAYASHANKAR PALANICHAMY

VIJAYASHANKAR PALANICHAMY

May 30, 2016
1.3k
0

    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();

    yogesh soni
    June 29, 2017
    0

    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.