ReadOnlyList based on stored procedure selection

ReadOnlyList based on stored procedure selection

Old forum URL: forums.lhotka.net/forums/t/12105.aspx


CraigJ posted on Wednesday, August 07, 2013

Hi.  I was wondering if anyone has any advice on how to generate a ReadOnlyList object with strongly typed inner list objects from just a stored procedure.  We are converting a lot of CSLA 1.2 objects to 4.0 and many of them are ReadOnlyLists based on a proc that may join a few tables together. 

One way I see to do it would be to put the results of a proc call into a permanent table, then generate the business object from that table and indicate that I want to use a stored proc in the generator UI.  Or just create the business objects manually.  I'm hoping there is a third option -- any help is appreciated!

Craig

tiago replied on Wednesday, August 07, 2013

Hi Craig,

What code generator are you using? CslaGenFork can generate NameValueList and ReadOnly collections from stored procedures and views.

CraigJ replied on Wednesday, August 07, 2013

Thanks for the reply.  We are using CodeSmith 6.5.  Is there any custom template that you are aware of for Code Smith?

tiago replied on Wednesday, August 07, 2013

Sorry. Can't help you there as I don't know the product.

JonnyBee replied on Thursday, August 08, 2013

I would suggest that you post this question on the Codesmith forum.

http://community.codesmithtools.com/Template_Frameworks/f/68.aspx

CraigJ replied on Thursday, August 08, 2013

Ok I've done that -- thanks for the tip.

Copyright (c) Marimer LLC