none
Cannot generate entity model diagram from database for custom provider RRS feed

  • Question

  • I am getting the following messages from Entity Framework when I try to generate entity model diagram from my custom EF provider:

    Added the connection string to App.Config.
    Generated model file: Model57.edmx.
    Loading metadata from database took 00:00:02.9781655.
    Generating model took 00:00:01.4934399.
    Writing out the EDMX file took 00:00:00.0008787.

    Everything looks good except it is failing to generate the entity model diagram and related code in the Model.Designer.cs file

    This is VS 2008 EF custom provider. I am unable to debug any issues related to this due to there are no error reported by the framework.

    After the table selection, I can see the last call in the debugger in the ProviderManifest class's GetProviderManifest() method. It is loading ProviderManifest.xml but it is not complaining about datatype conversion issues between provider types and EDM types. I have a feeling that there may be some mismatch going on in there but just can't figure it out. Any help on this issue would be highly appreciated.

    Thanks in advance,

    Syed.

    Tuesday, March 5, 2013 12:56 AM

Answers

All replies

  • Here is my ProviderManifest.xml if it helps.

    <?xml version="1.0" encoding="utf-8"?>
    <!--
    ####################################################################################################################

    BE AWARE THAT THE ORDER IN WHICH TYPES ARE DESCRIBED IN THE PROVIDER MANIFEST IS RELEVANT AND HAVE IMPACT IN LOOKUP
    PROCESS

    ####################################################################################################################
    -->
    <ProviderManifest Namespace="EFPrivate" xmlns="http://schemas.microsoft.com/ado/2006/04/edm/providermanifest">
      <Types>
        <Type Name="long" PrimitiveTypeKind="Int64">
        </Type>
        <Type Name="blob" PrimitiveTypeKind="Binary">
          <FacetDescriptions>
            <MaxLength Minimum="1" Maximum="2147483647" DefaultValue="2147483647" Constant="false" />
            <FixedLength DefaultValue="false" Constant="true" />
          </FacetDescriptions>
        </Type>
        <Type Name="char" PrimitiveTypeKind="String">
          <FacetDescriptions>
            <MaxLength Minimum="1" Maximum="254" DefaultValue="1" Constant="false" />
            <Unicode DefaultValue="false" Constant="false" />
            <FixedLength DefaultValue="true" Constant="true" />
          </FacetDescriptions>
        </Type>
        <Type Name="binary" PrimitiveTypeKind="Binary">
          <FacetDescriptions>
            <MaxLength Minimum="1" Maximum="8000" DefaultValue="8000" Constant="false" />
            <FixedLength DefaultValue="true" Constant="true" />
          </FacetDescriptions>
        </Type>
        <Type Name="clob" PrimitiveTypeKind="String">
          <FacetDescriptions>
            <MaxLength Minimum="1" Maximum="2147483647" DefaultValue="2147483647" Constant="false" />
            <Unicode DefaultValue="false" Constant="false" />
            <FixedLength DefaultValue="false" Constant="true" />
          </FacetDescriptions>
        </Type>
        <Type Name="date" PrimitiveTypeKind="DateTime">
          <FacetDescriptions>
            <Precision DefaultValue="0" Constant="true" />
          </FacetDescriptions>
        </Type>
        <Type Name="decimal" PrimitiveTypeKind="Decimal">
          <FacetDescriptions>
            <Precision Minimum="1" Maximum="31" DefaultValue="5" Constant="false" />
            <Scale Minimum="0" Maximum="31" DefaultValue="0" Constant="false" />
          </FacetDescriptions>
        </Type>
        <Type Name="double" PrimitiveTypeKind="Double">
        </Type>
        <Type Name="float" PrimitiveTypeKind="Double">
        </Type>
        <Type Name="int" PrimitiveTypeKind="Int32">
        </Type>
        <Type Name="integer" PrimitiveTypeKind="Int32">
        </Type>
        <Type Name="longvarchar" PrimitiveTypeKind="String">
          <FacetDescriptions>
            <MaxLength DefaultValue="32700" Constant="true" />
            <Unicode DefaultValue="false" Constant="false" />
            <FixedLength DefaultValue="false" Constant="true" />
          </FacetDescriptions>
        </Type>
        <Type Name="numeric" PrimitiveTypeKind="Decimal">
          <FacetDescriptions>
            <Precision Minimum="1" Maximum="31" DefaultValue="5" Constant="false" />
            <Scale Minimum="0" Maximum="31" DefaultValue="0" Constant="false" />
          </FacetDescriptions>
        </Type>
        <Type Name="real" PrimitiveTypeKind="Single">
        </Type>
        <Type Name="short" PrimitiveTypeKind="Int16">
        </Type>
        <Type Name="time" PrimitiveTypeKind="Time">
          <FacetDescriptions>
            <Precision DefaultValue="0" Constant="true" />
          </FacetDescriptions>
        </Type>
        <Type Name="timestamp" PrimitiveTypeKind="DateTime">
          <FacetDescriptions>
            <Precision DefaultValue="6" Constant="true" />
          </FacetDescriptions>
        </Type>
        <Type Name="boolean" PrimitiveTypeKind="Boolean">
        </Type>
        <Type Name="varchar" PrimitiveTypeKind="String">
          <FacetDescriptions>
            <MaxLength Minimum="1" Maximum="32672" DefaultValue="1" Constant="false" />
            <Unicode DefaultValue="false" Constant="false" />
            <FixedLength DefaultValue="false" Constant="true" />
          </FacetDescriptions>
        </Type>
        <Type Name="varbinary" PrimitiveTypeKind="Binary">
          <FacetDescriptions>
            <MaxLength Minimum="1" Maximum="2147483647" DefaultValue="2147483647" Constant="false" />
            <FixedLength DefaultValue="false" Constant="true" />
          </FacetDescriptions>
        </Type>
        <Type Name="xml" PrimitiveTypeKind="String" >
          <FacetDescriptions>
            <MaxLength DefaultValue="2147483647" Constant="true" />
            <Unicode DefaultValue="false" Constant="false" />
            <FixedLength DefaultValue="false" Constant="true" />
          </FacetDescriptions>
        </Type>
      </Types>
    </ProviderManifest>

    Tuesday, March 5, 2013 1:21 AM
  • Hi Syed,

    Welcome to the MSDN forum.

    I am trying to involve a senior expert into your thread. Please wait for the response. Sorry for any inconvenience.

    Good day.


    Alexander Sun [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, March 7, 2013 1:24 AM
  • Can you try using EdmGen and see what you get? You probably need to use /model:FullGeneration
    Thursday, March 14, 2013 6:14 PM