Association with stored procedures

40 views
Skip to first unread message

Thomas Skov

unread,
Dec 27, 2011, 11:39:28 AM12/27/11
to Business Logic Toolkit for .NET
Hey there.

Is there any way to map associations when using
DbManager.SetSpCommand(..).ExecuteList() so I can get a list of
objects with their relations (either one to one or one to many). How
need I structure my stored procedure, and is there any other things I
need to add to make it work? Have tried just adding [Association] to
the List<SubItems> of the main entity class, but it returns null. Any
ideas? Can only find examples that don't use SetCommand/SetSpCommand.

Regards

Robert Koritnik

unread,
Jan 15, 2012, 4:37:04 AM1/15/12
to Business Logic Toolkit for .NET
Have you tried using ExecuteResultSet which is used to fetch mutliple
resultsets and also associate them when configured correctly?
http://bltoolkit.net/Doc.ExecuteResultSet.ashx

I've also written a simple MapResultSet builder class that help s a
bit with creating these multi-result array objects:
http://erraticdev.blogspot.com/2011/08/bltoolkit-mapresultset-builder.html
Reply all
Reply to author
Forward
0 new messages