BO's & Stored Procedures


Author
Message
Philipp Guntermann
Philipp Guntermann
StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)StrataFrame User (231 reputation)
Group: Forum Members
Posts: 141, Visits: 263
Hi,

this is possible a very common question, but searching the forums and reading through the documentation still left me kind of clueless of how to accomplish the following scenario:

i have two tables:

theese translate to "MainCategories" and "SubCatergories".

I further have the following sproc, that returns a joined resultset from theese tables:

set ANSI_NULLS ON

set QUOTED_IDENTIFIER ON

GO

ALTER PROCEDURE [dbo].[spG_LeseWarengruppenMitObergruppen] AS

SELECT W.ID,

W.Bezeichnung AS 'Warengruppe',

O.Bezeichnung AS 'WarenObergruppe'

FROM tbWarengruppen W INNER JOIN tbWarenObergruppen O

ON W.tbWarenObergruppen_ID = O.ID

 

Now how would i got to get this resultset into a BO ? When i use the BO-Mapper, i can only select a table from the database directly.

I read the portion about custom field properties aswell and at first thought that was what i been looking for. For a quick test i wrote the following custom property field code into the bo code:

#region Custom Field Properties

[Browsable(true), BusinessFieldDisplayInEditor(), Description("WarenObergruppe"), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]

public string WarenObergruppe

{

get { return this.WarenObergruppe; }

}

protected override MicroFour.StrataFrame.Business.FieldPropertyDescriptor[] GetCustomBindablePropertyDescriptors()

{

return new FieldPropertyDescriptor[] { new ReflectionPropertyDescriptor("WarenObergruppe", typeof(WarengruppenBO)) };

}

#endregion

My Impression was, that this custom field property would now appear inside the buisness object mapper along with the other fields, and that i could just rename the field "Bezeichnung" to Warengruppe aswell as "removing" the fields ID and tbWarenObergruppen_ID to match up with the resultset that my sproc returns.

however, both assumtions turned out to be wrong.

So the question remains:

how do i "map" my sproc's resultset to a BO ?

Thanks.


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Philipp Guntermann - 16 Years Ago
Trent L. Taylor - 16 Years Ago
Michel Levy - 16 Years Ago
Philipp Guntermann - 16 Years Ago
Michel Levy - 16 Years Ago
Philipp Guntermann - 16 Years Ago
Michel Levy - 16 Years Ago
Philipp Guntermann - 16 Years Ago
Michel Levy - 16 Years Ago
Philipp Guntermann - 16 Years Ago
Philipp Guntermann - 16 Years Ago
Trent L. Taylor - 16 Years Ago
Philipp Guntermann - 16 Years Ago
                         No...we don't actually support this becuase we did not want to have to...
Trent L. Taylor - 16 Years Ago
                             [quote][b]Trent L. Taylor (09/25/2008)[/b][hr]No...we don't actually...
Philipp Guntermann - 16 Years Ago
                                 [quote]umm, so what you are saying is that the BOM/BO's does/do not...
Trent L. Taylor - 16 Years Ago
                                     [quote][b]Trent L. Taylor (09/25/2008)[/b][hr][quote]umm, so what you...
Philipp Guntermann - 16 Years Ago
                                         I think that you misunderstand what these connections are for. They...
Trent L. Taylor - 16 Years Ago
                                             [quote][b]Trent L. Taylor (09/25/2008)[/b][hr]I think that you...
Philipp Guntermann - 16 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search