locked
Operation is not valid due to the current state ofthe object EF 5/Oracle RRS feed

  • Question

  • Using EF 5 (.dll is in \packages\EntityFramework 5 but the version property reports 4.4.0.0.......??)

    I am trying to update some oracle tables that do not have PK's defined.  I cannot modify the table structures.  I can read data but when I try to update I get "Operation is not valid due to the current state of the object"

    I've seen these articles:

    http://stackoverflow.com/questions/8729279/updateexception-operation-is-not-valid-due-to-the-current-state-of-the-object-w

    http://stackoverflow.com/questions/3661509/objectcontext-savechanges-violates-primary-key-throws-updateexception

    http://connect.microsoft.com/VisualStudio/feedback/details/505178/storegeneratedpattern-property-in-ado-net-entity-model-designer-sets-cdsl-annotation-but-not-ssdl-attribute

    Supposidly the StoreGeneratedPattern problem is fixed but I had to add the attribute manually to my edmx file as shown below. Do I still need to do this if the bug is fixed?  Am I even on the right track with this?? Thanks for any assistance I really need it.

    StoreGeneratedPattern was added manually in xml below:

     <!--Errors Found During Generation:
          warning 6002: The table/view 'STP_COMPLIANCE_OWN.PMSC_VERSION' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
          -->
            <EntityType Name="PMSC_VERSION">
              <Key>
                <PropertyRef Name="PMSC_NO"  />
                <PropertyRef Name="PMSC_REV_SEQ_NO" />
                <PropertyRef Name="STRATEGY_DATE" />
              </Key>
              <Property Name="PMSC_NO" Type="number" Nullable="false" Precision="10" StoreGeneratedPattern="Identity" />
              <Property Name="PMSC_REV_SEQ_NO" Type="number" Nullable="false" Precision="5"  StoreGeneratedPattern="Identity" />
              <Property Name="STATUS" Type="varchar2" Nullable="false" MaxLength="15" />
              <Property Name="BLOOMBERG_COMP_TYPE" Type="number" Nullable="false" Precision="5" />
              <Property Name="STRATEGY_CODE" Type="varchar2" Nullable="false" MaxLength="8" />
              <Property Name="STRATEGY_DATE" Type="varchar2" Nullable="false" MaxLength="8"  StoreGeneratedPattern="Identity" />
            </EntityType>
    <!-- CSDL content -->
    <EntityType Name="PMSC_VERSION">
              <Key>
                <PropertyRef Name="PMSC_NO" />
                <PropertyRef Name="PMSC_REV_SEQ_NO" />
                <PropertyRef Name="STRATEGY_DATE" />
              </Key>
              <Property Name="PMSC_NO" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
              <Property Name="PMSC_REV_SEQ_NO" Type="Int16" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
              <Property Name="STATUS" Type="String" Nullable="false" MaxLength="15" Unicode="false" FixedLength="false" />
              <Property Name="BLOOMBERG_COMP_TYPE" Type="Int16" Nullable="false" />
              <Property Name="STRATEGY_CODE" Type="String" Nullable="false" MaxLength="8" Unicode="false" FixedLength="false" />
              <Property Name="STRATEGY_DATE" Type="String" Nullable="false" MaxLength="8" Unicode="false" FixedLength="false" annotation:StoreGeneratedPattern="Identity" />
              <NavigationProperty Name="TRADE_VERSION_IN_PMSCS" Relationship="Model.TRADE_VERSION_IN_PMSCPMSC_VERSION" FromRole="PMSC_VERSION" ToRole="TRADE_VERSION_IN_PMSC" />
            </EntityType>

    Monday, September 17, 2012 6:34 PM

All replies

  • Please check the metadata, if 'StoreGeneratedPattern' isn't exist in SSDL, you need to manually add it. I still find someone didn't solve the issue by the hotfix in the Connect.

    Wednesday, September 19, 2012 1:53 AM
  • Thank you I have checked the edmx file I'm pretty sure I added StoreGeneratedPattern where needed. 

    1.)  Is the issue supposed to be fixed in EF 5? 

    2.) Assuming StoreGeneratedPattern is not the issue, what other issues should I look for? 

    Thank you for your help!  Edmx file is below.  I cut out some columns to reduce the size.

    <?xml version="1.0" encoding="utf-8"?>
    <edmx:Edmx Version="2.0" xmlns:edmx="http://schemas.microsoft.com/ado/2008/10/edmx">
      <!-- EF Runtime content -->
      <edmx:Runtime>
        <!-- SSDL content -->
        <edmx:StorageModels>
          <Schema Namespace="Model.Store" Alias="Self" Provider="Oracle.DataAccess.Client" ProviderManifestToken="11.2" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl">
            <EntityContainer Name="ModelStoreContainer">
              <EntitySet Name="ALLOCATION_CORE" EntityType="Model.Store.ALLOCATION_CORE" store:Type="Tables" store:Schema="STP_COMPLIANCE_OWN" store:Name="ALLOCATION_CORE">
                <DefiningQuery>SELECT 
          "ALLOCATION_CORE"."ALLOCATION_ID" AS "ALLOCATION_ID", 
          
          FROM "STP_COMPLIANCE_OWN"."ALLOCATION_CORE" "ALLOCATION_CORE"</DefiningQuery>
              </EntitySet>
              <EntitySet Name="ALLOCATION_IN_VERSION" EntityType="Model.Store.ALLOCATION_IN_VERSION" store:Type="Tables" store:Schema="STP_COMPLIANCE_OWN" store:Name="ALLOCATION_IN_VERSION">
                <DefiningQuery>SELECT 
          "ALLOCATION_IN_VERSION"."TRADE_ID" AS "TRADE_ID", 
          
          FROM "STP_COMPLIANCE_OWN"."ALLOCATION_IN_VERSION" "ALLOCATION_IN_VERSION"</DefiningQuery>
              </EntitySet>
              <EntitySet Name="PMSC_VERSION" EntityType="Model.Store.PMSC_VERSION" store:Type="Tables" store:Schema="STP_COMPLIANCE_OWN" store:Name="PMSC_VERSION">
                <DefiningQuery>SELECT 
          "PMSC_VERSION"."PMSC_NO" AS "PMSC_NO", 
          
          FROM "STP_COMPLIANCE_OWN"."PMSC_VERSION" "PMSC_VERSION"</DefiningQuery>
              </EntitySet>
              <EntitySet Name="TRADE_VERSION" EntityType="Model.Store.TRADE_VERSION" store:Type="Tables" store:Schema="STP_COMPLIANCE_OWN" store:Name="TRADE_VERSION">
                <DefiningQuery>SELECT 
          "TRADE_VERSION"."TRADE_ID" AS "TRADE_ID", 
          
          FROM "STP_COMPLIANCE_OWN"."TRADE_VERSION" "TRADE_VERSION"</DefiningQuery>
              </EntitySet>
              <EntitySet Name="TRADE_VERSION_IN_PMSC" EntityType="Model.Store.TRADE_VERSION_IN_PMSC" store:Type="Tables" store:Schema="STP_COMPLIANCE_OWN" store:Name="TRADE_VERSION_IN_PMSC">
                <DefiningQuery>SELECT 
          "TRADE_VERSION_IN_PMSC"."PMSC_NO" AS "PMSC_NO", 
          "TRADE_VERSION_IN_PMSC"."PMSC_REV_SEQ_NO" AS "PMSC_REV_SEQ_NO", 
          "TRADE_VERSION_IN_PMSC"."TRADE_ID" AS "TRADE_ID", 
          "TRADE_VERSION_IN_PMSC"."TRADE_REV_SEQ_NO" AS "TRADE_REV_SEQ_NO", 
          "TRADE_VERSION_IN_PMSC"."STRATEGY_DATE" AS "STRATEGY_DATE"
          FROM "STP_COMPLIANCE_OWN"."TRADE_VERSION_IN_PMSC" "TRADE_VERSION_IN_PMSC"</DefiningQuery>
              </EntitySet>
            </EntityContainer>
            <!--Errors Found During Generation:
          warning 6002: The table/view 'STP_COMPLIANCE_OWN.ALLOCATION_CORE' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
          -->
            <EntityType Name="ALLOCATION_CORE">
              <Key>
                <PropertyRef Name="ALLOCATION_ID" />
              </Key>
              <Property Name="ALLOCATION_ID" Type="number" Nullable="false" Precision="10" StoreGeneratedPattern="Identity" />
          
            </EntityType>
            <!--Errors Found During Generation:
          warning 6002: The table/view 'STP_COMPLIANCE_OWN.ALLOCATION_IN_VERSION' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
          -->
            <EntityType Name="ALLOCATION_IN_VERSION">
              <Key>
                <PropertyRef Name="TRADE_ID" />
                <PropertyRef Name="TRADE_REV_SEQ_NO" />
                <PropertyRef Name="ALLOCATION_ID" />
              </Key>
              <Property Name="TRADE_ID" Type="number" Nullable="false" Precision="10" StoreGeneratedPattern="Identity" />
              <Property Name="TRADE_REV_SEQ_NO" Type="number" Nullable="false" Precision="5" StoreGeneratedPattern="Identity" />
              <Property Name="ALLOCATION_ID" Type="number" Nullable="false" Precision="10" StoreGeneratedPattern="Identity" />
          
            </EntityType>
            <!--Errors Found During Generation:
          warning 6002: The table/view 'STP_COMPLIANCE_OWN.PMSC_VERSION' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
          -->
            <EntityType Name="PMSC_VERSION">
              <Key>
                <PropertyRef Name="PMSC_NO"  />
                <PropertyRef Name="PMSC_REV_SEQ_NO" />
                <PropertyRef Name="STRATEGY_DATE" />
              </Key>
              <Property Name="PMSC_NO" Type="number" Nullable="false" Precision="10" StoreGeneratedPattern="Identity" />
              <Property Name="PMSC_REV_SEQ_NO" Type="number" Nullable="false" Precision="5"  StoreGeneratedPattern="Identity" />
              <Property Name="STATUS" Type="varchar2" Nullable="false" MaxLength="15" />
              <Property Name="BLOOMBERG_COMP_TYPE" Type="number" Nullable="false" Precision="5" />
              <Property Name="STRATEGY_CODE" Type="varchar2" Nullable="false" MaxLength="8" />
              <Property Name="STRATEGY_DATE" Type="varchar2" Nullable="false" MaxLength="8"  StoreGeneratedPattern="Identity" />
            </EntityType>
            <!--Errors Found During Generation:
          warning 6002: The table/view 'STP_COMPLIANCE_OWN.TRADE_VERSION' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
          -->
            <EntityType Name="TRADE_VERSION">
              <Key>
                <PropertyRef Name="TRADE_ID" />
                <PropertyRef Name="TRADE_REV_SEQ_NO" />
              </Key>
              <Property Name="TRADE_ID" Type="number" Nullable="false" Precision="10" StoreGeneratedPattern="Identity" />
              <Property Name="TRADE_REV_SEQ_NO" Type="number" Nullable="false" Precision="5" StoreGeneratedPattern="Identity" />
          
            </EntityType>
            <!--Errors Found During Generation:
          warning 6002: The table/view 'STP_COMPLIANCE_OWN.TRADE_VERSION_IN_PMSC' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
          -->
            <EntityType Name="TRADE_VERSION_IN_PMSC">
              <Key>
                <PropertyRef Name="PMSC_NO" />
                <PropertyRef Name="PMSC_REV_SEQ_NO" />
                <PropertyRef Name="TRADE_ID" />
                <PropertyRef Name="TRADE_REV_SEQ_NO" />
                <PropertyRef Name="STRATEGY_DATE" />
              </Key>
              <Property Name="PMSC_NO" Type="number" Nullable="false" Precision="10" StoreGeneratedPattern="Identity" />
              <Property Name="PMSC_REV_SEQ_NO" Type="number" Nullable="false" Precision="5" StoreGeneratedPattern="Identity" />
              <Property Name="TRADE_ID" Type="number" Nullable="false" Precision="10" StoreGeneratedPattern="Identity" />
              <Property Name="TRADE_REV_SEQ_NO" Type="number" Nullable="false" Precision="5" StoreGeneratedPattern="Identity" />
              <Property Name="STRATEGY_DATE" Type="varchar2" Nullable="false" MaxLength="8" StoreGeneratedPattern="Identity" />
            </EntityType>
          </Schema>
        </edmx:StorageModels>
        <!-- CSDL content -->
        <edmx:ConceptualModels>
          <Schema Namespace="Model" Alias="Self" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns="http://schemas.microsoft.com/ado/2008/09/edm">
            <EntityContainer Name="STPModel" annotation:LazyLoadingEnabled="true">
              <EntitySet Name="ALLOCATION_CORES" EntityType="Model.ALLOCATION_CORE" />
              <EntitySet Name="ALLOCATION_IN_VERSIONS" EntityType="Model.ALLOCATION_IN_VERSION" />
              <EntitySet Name="PMSC_VERSIONS" EntityType="Model.PMSC_VERSION" />
              <EntitySet Name="TRADE_VERSIONS" EntityType="Model.TRADE_VERSION" />
              <EntitySet Name="TRADE_VERSION_IN_PMSCS" EntityType="Model.TRADE_VERSION_IN_PMSC" />
              <AssociationSet Name="TRADE_VERSION_IN_PMSCPMSC_VERSION" Association="Model.TRADE_VERSION_IN_PMSCPMSC_VERSION">
                <End Role="TRADE_VERSION_IN_PMSC" EntitySet="TRADE_VERSION_IN_PMSCS" />
                <End Role="PMSC_VERSION" EntitySet="PMSC_VERSIONS" />
              </AssociationSet>
              <AssociationSet Name="TRADE_VERSIONTRADE_VERSION_IN_PMSC" Association="Model.TRADE_VERSIONTRADE_VERSION_IN_PMSC">
                <End Role="TRADE_VERSION" EntitySet="TRADE_VERSIONS" />
                <End Role="TRADE_VERSION_IN_PMSC" EntitySet="TRADE_VERSION_IN_PMSCS" />
              </AssociationSet>
              <AssociationSet Name="TRADE_VERSIONALLOCATION_IN_VERSION" Association="Model.TRADE_VERSIONALLOCATION_IN_VERSION">
                <End Role="TRADE_VERSION" EntitySet="TRADE_VERSIONS" />
                <End Role="ALLOCATION_IN_VERSION" EntitySet="ALLOCATION_IN_VERSIONS" />
              </AssociationSet>
              <AssociationSet Name="ALLOCATION_COREALLOCATION_IN_VERSION" Association="Model.ALLOCATION_COREALLOCATION_IN_VERSION">
                <End Role="ALLOCATION_CORE" EntitySet="ALLOCATION_CORES" />
                <End Role="ALLOCATION_IN_VERSION" EntitySet="ALLOCATION_IN_VERSIONS" />
              </AssociationSet>
            </EntityContainer>
            <EntityType Name="ALLOCATION_CORE">
              <Key>
                <PropertyRef Name="ALLOCATION_ID" />
              </Key>
              <Property Name="ALLOCATION_ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          
              <Property Name="REV_INCR_DECR_IND" Type="String" Nullable="false" MaxLength="1" Unicode="false" FixedLength="true" />
              <NavigationProperty Name="ALLOCATION_IN_VERSIONS" Relationship="Model.ALLOCATION_COREALLOCATION_IN_VERSION" FromRole="ALLOCATION_CORE" ToRole="ALLOCATION_IN_VERSION" />
            </EntityType>
            <EntityType Name="ALLOCATION_IN_VERSION">
              <Key>
                <PropertyRef Name="TRADE_ID" />
                <PropertyRef Name="TRADE_REV_SEQ_NO" />
                <PropertyRef Name="ALLOCATION_ID" />
              </Key>
              <Property Name="TRADE_ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
              <Property Name="TRADE_REV_SEQ_NO" Type="Int16" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
              <Property Name="ALLOCATION_ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          
              <NavigationProperty Name="TRADE_VERSION" Relationship="Model.TRADE_VERSIONALLOCATION_IN_VERSION" FromRole="ALLOCATION_IN_VERSION" ToRole="TRADE_VERSION" />
              <NavigationProperty Name="ALLOCATION_CORE" Relationship="Model.ALLOCATION_COREALLOCATION_IN_VERSION" FromRole="ALLOCATION_IN_VERSION" ToRole="ALLOCATION_CORE" />
            </EntityType>
            <EntityType Name="PMSC_VERSION">
              <Key>
                <PropertyRef Name="PMSC_NO" />
                <PropertyRef Name="PMSC_REV_SEQ_NO" />
                <PropertyRef Name="STRATEGY_DATE" />
              </Key>
              <Property Name="PMSC_NO" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
              <Property Name="PMSC_REV_SEQ_NO" Type="Int16" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
              <Property Name="STATUS" Type="String" Nullable="false" MaxLength="15" Unicode="false" FixedLength="false" />
              <Property Name="BLOOMBERG_COMP_TYPE" Type="Int16" Nullable="false" />
              <Property Name="STRATEGY_CODE" Type="String" Nullable="false" MaxLength="8" Unicode="false" FixedLength="false" />
              <Property Name="STRATEGY_DATE" Type="String" Nullable="false" MaxLength="8" Unicode="false" FixedLength="false" annotation:StoreGeneratedPattern="Identity" />
              <NavigationProperty Name="TRADE_VERSION_IN_PMSCS" Relationship="Model.TRADE_VERSION_IN_PMSCPMSC_VERSION" FromRole="PMSC_VERSION" ToRole="TRADE_VERSION_IN_PMSC" />
            </EntityType>
            <EntityType Name="TRADE_VERSION">
              <Key>
                <PropertyRef Name="TRADE_ID" />
                <PropertyRef Name="TRADE_REV_SEQ_NO" />
              </Key>
              <Property Name="TRADE_ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
              <Property Name="TRADE_REV_SEQ_NO" Type="Int16" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          
              <NavigationProperty Name="TRADE_VERSION_IN_PMSCS" Relationship="Model.TRADE_VERSIONTRADE_VERSION_IN_PMSC" FromRole="TRADE_VERSION" ToRole="TRADE_VERSION_IN_PMSC" />
              <NavigationProperty Name="ALLOCATION_IN_VERSIONS" Relationship="Model.TRADE_VERSIONALLOCATION_IN_VERSION" FromRole="TRADE_VERSION" ToRole="ALLOCATION_IN_VERSION" />
            </EntityType>
            <EntityType Name="TRADE_VERSION_IN_PMSC">
              <Key>
                <PropertyRef Name="PMSC_NO" />
                <PropertyRef Name="PMSC_REV_SEQ_NO" />
                <PropertyRef Name="TRADE_ID" />
                <PropertyRef Name="TRADE_REV_SEQ_NO" />
                <PropertyRef Name="STRATEGY_DATE" />
              </Key>
              <Property Name="PMSC_NO" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
              <Property Name="PMSC_REV_SEQ_NO" Type="Int16" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
              <Property Name="TRADE_ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
              <Property Name="TRADE_REV_SEQ_NO" Type="Int16" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
              <Property Name="STRATEGY_DATE" Type="String" Nullable="false" MaxLength="8" Unicode="false" FixedLength="false" annotation:StoreGeneratedPattern="Identity" />
              <NavigationProperty Name="PMSC_VERSION" Relationship="Model.TRADE_VERSION_IN_PMSCPMSC_VERSION" FromRole="TRADE_VERSION_IN_PMSC" ToRole="PMSC_VERSION" />
              <NavigationProperty Name="TRADE_VERSION" Relationship="Model.TRADE_VERSIONTRADE_VERSION_IN_PMSC" FromRole="TRADE_VERSION_IN_PMSC" ToRole="TRADE_VERSION" />
            </EntityType>
            <Association Name="TRADE_VERSION_IN_PMSCPMSC_VERSION">
              <End Type="Model.TRADE_VERSION_IN_PMSC" Role="TRADE_VERSION_IN_PMSC" Multiplicity="*" />
              <End Type="Model.PMSC_VERSION" Role="PMSC_VERSION" Multiplicity="1" />
              <ReferentialConstraint>
                <Principal Role="PMSC_VERSION">
                  <PropertyRef Name="PMSC_NO" />
                  <PropertyRef Name="PMSC_REV_SEQ_NO" />
                  <PropertyRef Name="STRATEGY_DATE" />
                </Principal>
                <Dependent Role="TRADE_VERSION_IN_PMSC">
                  <PropertyRef Name="PMSC_NO" />
                  <PropertyRef Name="PMSC_REV_SEQ_NO" />
                  <PropertyRef Name="STRATEGY_DATE" />
                </Dependent>
              </ReferentialConstraint>
            </Association>
            <Association Name="TRADE_VERSIONTRADE_VERSION_IN_PMSC">
              <End Type="Model.TRADE_VERSION" Role="TRADE_VERSION" Multiplicity="1" />
              <End Type="Model.TRADE_VERSION_IN_PMSC" Role="TRADE_VERSION_IN_PMSC" Multiplicity="*" />
              <ReferentialConstraint>
                <Principal Role="TRADE_VERSION">
                  <PropertyRef Name="TRADE_ID" />
                  <PropertyRef Name="TRADE_REV_SEQ_NO" />
                </Principal>
                <Dependent Role="TRADE_VERSION_IN_PMSC">
                  <PropertyRef Name="TRADE_ID" />
                  <PropertyRef Name="TRADE_REV_SEQ_NO" />
                </Dependent>
              </ReferentialConstraint>
            </Association>
            <Association Name="TRADE_VERSIONALLOCATION_IN_VERSION">
              <End Type="Model.TRADE_VERSION" Role="TRADE_VERSION" Multiplicity="1" />
              <End Type="Model.ALLOCATION_IN_VERSION" Role="ALLOCATION_IN_VERSION" Multiplicity="*" />
              <ReferentialConstraint>
                <Principal Role="TRADE_VERSION">
                  <PropertyRef Name="TRADE_ID" />
                  <PropertyRef Name="TRADE_REV_SEQ_NO" />
                </Principal>
                <Dependent Role="ALLOCATION_IN_VERSION">
                  <PropertyRef Name="TRADE_ID" />
                  <PropertyRef Name="TRADE_REV_SEQ_NO" />
                </Dependent>
              </ReferentialConstraint>
            </Association>
            <Association Name="ALLOCATION_COREALLOCATION_IN_VERSION">
              <End Type="Model.ALLOCATION_CORE" Role="ALLOCATION_CORE" Multiplicity="1" />
              <End Type="Model.ALLOCATION_IN_VERSION" Role="ALLOCATION_IN_VERSION" Multiplicity="*" />
              <ReferentialConstraint>
                <Principal Role="ALLOCATION_CORE">
                  <PropertyRef Name="ALLOCATION_ID" />
                </Principal>
                <Dependent Role="ALLOCATION_IN_VERSION">
                  <PropertyRef Name="ALLOCATION_ID" />
                </Dependent>
              </ReferentialConstraint>
            </Association>
          </Schema>
        </edmx:ConceptualModels>
        <!-- C-S mapping content -->
        <edmx:Mappings>
          
        </edmx:Mappings>
      </edmx:Runtime>
      <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
      <Designer xmlns="http://schemas.microsoft.com/ado/2008/10/edmx">
        
      </Designer>
    </edmx:Edmx>

    Wednesday, September 19, 2012 2:32 PM
  • Hi

    I don't find anything related to 'StoreGeneratedPattern' in their team blog: http://blogs.msdn.com/b/adonet/archive/2012/08/15/ef5-released.aspx.

    Is your app a web application? If yes, I think this thread may help.

    http://stackoverflow.com/questions/10697194/operation-is-not-valid-due-to-the-current-state-of-the-object-when-i-select-dro

    Thursday, September 20, 2012 2:32 AM
  • Hi SWheaties,

    Does @Doraemon_3's solution help? If you still have problem, please feel free to let me know.

    Best Regards


    Allen Li [MSFT]
    MSDN Community Support | Feedback to us

    Monday, September 24, 2012 1:46 AM
  • No unfortunately it does not work.  I have been sidetracked on an another project for the last couple days, just getting back to this.  I  read somewhere that dbcontext api is not compatible with oracle's client - exactly how/why that might be true is beyond me.  I'll change that and see if it makes a difference.  If not I'm going to have to go back to that yuckky nhibersomething thing.  I've been lobbying to get EF into my organisation it sure would be nice if I can get this working.  I love EF... when it works :)
    Wednesday, September 26, 2012 1:10 AM
  • Hi SWHeaties,

    I'm afraid Oracle is 3rd party database, so I have no environment to help you. I recommend you to post the issue here, some Oracle experts may have ideas. Sorry for little help, I hope the issue can be solved soon. : )

    Best Regards


    Allen Li [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, September 26, 2012 3:39 AM
  • Hi, we have the same problem in a new MVC 4 project using VS2012, EF 5 and ODP.NET for Oracle 11.

    Everytime we "generate database from model", the ssdl part on edmx file loses the "storedGeneratedPatter=Identity" attribute.

    Does anyone know how to workaround (not manually!) or fix the problem in VS2012?
    Tuesday, December 11, 2012 10:14 AM