Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 19, 2012 02:12 PM by pwensel
May 02, 2010 11:13 AM|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 01:22 PM|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 08:22 PM|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 02:12 PM|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