1

I am trying to insert in Oracle table using entity framework. I am able to retrieve data but I am not able to insert data into the tables. Following is the error I receive when trying to insert data.

+       InnerException  {"The table/view does not have a primary key defined. The Entity is read-only"} System.Exception {System.InvalidOperationException}

I have primary keys in all the tables which also means the "Entity Key" checked. I have tried deleting the tables and adding it back again, I also tried recreating the .edmx file, but the error persists. I am using VS 2012 and .net framework 4.6.1.

Any suggestion which will help solving this error are appreciated. I have done lot of research and have tried all the suggestions available on related posts but the error still persists.

Programmermid
  • 588
  • 3
  • 9
  • 30
  • This link might help you out. http://stackoverflow.com/questions/24792259/error-6002-the-table-view-does-not-have-a-primary-key-defined – atokpas Nov 14 '16 at 03:21
  • 1
    @JSapkota I have tried the suggestions in this post. Didn't worked. Also, I am not getting warnings it is a error breaking my code. – Programmermid Nov 14 '16 at 03:29
  • @Programmermid : Any success on this. Are you able to resolve this issue. If yes let me know the solution. – Sham Mar 26 '17 at 10:49

0 Answers0