Last post Aug 31, 2019 06:15 PM by mgebhard
Aug 31, 2019 05:12 PM|vinodkpasi|LINK
I am using Entity First Database-first approach for existing database. Few tables don't not have key column. I am getting below error. There is any way to bypass the Entity Framework behavior for tables those dont have key columns
"The table/view TABLE_NAME does not have a primary key defined and no valid primary key could be inferred. This table/view has been excluded. To use the entity, you will need to review your schema, add the correct keys, and uncomment it".
Aug 31, 2019 06:15 PM|mgebhard|LINK
No, tables must have a key. You can code around this by using raw queries but properly normalizing your table deigns (adding a key) is the recommended approach.