Last post Dec 19, 2012 10:12 AM by pwensel
May 02, 2010 07:13 AM|EJLindsay|LINK
Cannot seem to find a good fit for my question so I will ask here.
Does Asp.Net 4.0 solve the problems with using Views with EntityFramework is not able to recognize primary keys.
ASP.NET 4.0 EntityFramework and Views
May 02, 2010 09:22 AM|ignatandrei|LINK
EF now is recognizing Foreign Key
Could you give an exampe where you encountered
problems with using Views with EntityFramework is not able to recognize primary keys.
May 02, 2010 04:22 PM|EJLindsay|LINK
I have not installed VS 2010 yet. I was just asking the question to see if VS 2010 will solve me problem with views.
Dec 19, 2012 10:12 AM|pwensel|LINK
I am using Oracle as the DB, VS2012, and EF 5.0. I know the table has a PK (Composite Key) and I create a view (create view v_table_name as select * from table_name). When i try to add the view to EF, it says there is not PK and makes the object read only.
I have tried adding a PK to the view but it tells me that the "table can have only on primary key" ( ALTER VIEW V_TABLE_NAME ADD CONSTRAINT V_V_TABLE_NAME_PK PRIMARY KEY (DRSY, DRRT, DRKY) DISABLE NOVALIDATE;)
Any idea why EF is not recognizing the PK