开发者

Telerik OpenAccess ORM - return types for queries

开发者 https://www.devze.com 2023-03-22 21:57 出处:网络
Is there a way to change the return type开发者_运维技巧 for queries generated by OpenAccess?The default return type is Object[], but I need it to be a specific type that was generated by the ORM. It s

Is there a way to change the return type开发者_运维技巧 for queries generated by OpenAccess? The default return type is Object[], but I need it to be a specific type that was generated by the ORM.


It seems you are referring to the code generated to execute a stored procedure. This method, in the generated context class, is regenerated every time you save the domain model (.rlinq file). In case you want to modify the return type you can create a partial class for the context and add the method there.

Regarding the question - how do you change the return type of the generated method? Currently this is not supported via the designer but work on a detailed UI for stored procedures, is ongoing. The next service pack would most probably have a UI where you can choose an existing persistent type as the return value or you can generate a CLR type which maps to the returned result.

0

精彩评论

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