ReturnType "invalid child element" of Function element in EDMX

192 Views Asked by At
<Schema Namespace="OurModel.Store" 
    ... 
    xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl">

  <Function Name="fn_Test" Schema="dbo" IsComposable="true">
    <ReturnType>
      <CollectionType>
        <RowType>
          <Property Name="A" Type="varchar" MaxLength="10" />
          <Property Name="B" Type="varchar" MaxLength="60" />
        </RowType>
      </CollectionType>
    </ReturnType>
    <Parameter Name="X" Mode="In" Type="varchar" MaxLength="10" />
    <Parameter Name="Y" Mode="In" Type="int" />
  </Function>

Error:

Error 5: The element 'Function' in namespace 'http://schemas.microsoft.com/ado/2009/02/edm/ssdl' has invalid child element 'ReturnType' in namespace 'http://schemas.microsoft.com/ado/2009/02/edm/ssdl'. List of possible elements expected: 'Documentation, CommandText, Parameter' in namespace 'http://schemas.microsoft.com/ado/2009/02/edm/ssdl' as well as any element in namespace '##other'.

MSDN documents ReturnType as a child element of Function.

Our model uses EDMX 2.0. Is ReturnType an EDMX 3.0 feature?

1

There are 1 best solutions below

0
On

I already fixed the issue.

I deleted all lines that have errors in the XML editor. Then I open EDMX file using 'Entity data model designer' from 'open with' menu. Last step I Updated the model from the database by right click on the designer.