XML Mapping for Complex Types

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
JustinH
Posts: 1
Joined: Tue 06 Aug 2019 14:23

XML Mapping for Complex Types

Post by JustinH » Tue 06 Aug 2019 14:40

Hi,

I've followed the documentation with regards to setting up support for multiple database providers (MS SQL and PostgreSQL) and setting up data contexts from the XML files. All works as expected as long as we have no complex return types for our methods (in our case table-valued functions). When any methods exist with a complex return type the application returns a InvalidOperationException with the message 'Could not find element type '[Namespace].tvf_[FunctionName]Result in model." when attempting to initialise the data context from the file.

Is this a know issue or perhaps there is something I'm missing with regards to the complex type declarations?

Any help would be appreciated.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: XML Mapping for Complex Types

Post by Shalex » Wed 07 Aug 2019 18:02

Please open *.lqml via right-click in Solution Explorer > Open With > Entity Developer and set Pipelined=True in the properties of your table-valued function via Tools > Entity Developer > Model Explorer. This setting will add IsComposable=true to the Function attribute in the generated code.

Refer to https://www.devart.com/linqconnect/docs ... tions.html.

If this doesn't help, send us a small test project with the corresponding DDL/DML script for reproducing.

Post Reply