locked
ASP.NET 4.0, EntityFramework and Views RRS feed

  • Question

  • User-1387982746 posted

     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.

    Jay

    Sunday, May 2, 2010 7:13 AM

Answers

  • User197322208 posted

    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.
    ?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, May 2, 2010 9:22 AM

All replies

  • User197322208 posted

    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.
    ?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, May 2, 2010 9:22 AM
  • User-1387982746 posted

     I have not installed VS 2010 yet.  I was just asking the question to see if VS 2010 will solve me problem with views.

    Jay

    Sunday, May 2, 2010 4:22 PM
  • User-1366081788 posted

    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

    Wednesday, December 19, 2012 10:12 AM