none
entity framework many to many save RRS feed

  • Question

  • Hello,

    I have the following DB tables:
    Operation
    Parameter 
    OperationToParameter (has 2 foreign keys to previous tables, both foreign keys are declared as PK as well)

    I updated my EF model from DB . It created me Operation and Parameter entities, the OperationToParameter it created as association between the 2 tables with many to many relation as i need.
    The thing is when i am trying to do SaveChanges (my changed object is ParameterDefinition which has navigation to Operation and Parameter entities ) it throws exception-
    Unable to update the EntitySet '[Table Name]' because it has a DefiningQuery and no <InsertFunction> element exists in the <ModificationFunctionMapping> .

    how can i solve this?
    Friday, September 7, 2012 12:29 PM

All replies

  • Hi michaelgr123;

    Can you please post the SQL script that you can create through SQL Management program of the tables involved in the situation and also the code that you are using so that we can try to recreate the situation on our system.

      


    Fernando (MCSD)

    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".

    Saturday, September 8, 2012 1:20 PM