开发者

Entity Framework 4 -- possible to call a SSDL function from within another SSDL function's commandtext?

Is it possible to call a SSDL function from within another SSDL function's CommandText? For example, let's say I have the following SSDL function defined in my edmx file:

<Function Name="blah" IsComposable="false">
  <CommandText>
    ...blah related stuff...
  </CommandText>
  <Parameter Name="blah_param" Type="int" />
</Function>

Can I define a second SSDL function that calls "blah"? For example:

<Function Name="blah2" IsComposable="false">
  <CommandText>
    ...
    blah(3);
    ...
  </CommandText>
  <Parameter Name="blah2_param" Type="int" />
</Function>

"blah" and "blah2" do NOT exist as stored procedures on the database and are fully defined in the SSDL of the edmx. I tried qualifying the call with a handful of different things (appending the SSDL namespace to the function name -- BlahModel.Store.blah(3), using "execute procedure" and "call" SQL keywords, etc).

It appears that once it hits the Command开发者_JS百科Text tag, everything is sent over to the database and no parsing/resolving of the inner CommandText is done. Does anyone have any insight into whether this is possible or not?

Thanks!


It is not possible. CommandText should contain a valid SQL/Transact-SQL/PL/SQL expression only.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜