Hi There
I'm reasonably new to LLBLGenPro , but I am having a few issues figuring out the best way to do this.
I Have en Entity Called SKU which has relationships to Product and then Category ( standard shopping cart stuff )
I want to add 2 database functions to this entity while keeping the relationships with the other tables. I know how to add the DBfunctioncalls , but I am trying to figure the best way to do this seeing as it is a frequently used query ( i.e. building query from scratch every time would have quite a significant overhead I would imagine ) .
So maybe I would put the DBfunctioncall in the subclasses somewhere? The catch is I need to set the RoleName ( which is represented as 'public' below ) dynamically every time. Or maybe the best way is to define a typed list and use .expand & .add ?
The SQL would be something like ...
SELECT SKU.ID,
SKU.Code ,
... [more SKU.fields],
dbo.BasePrice('Public', SkuID )
dbo.DoesSkuHaveDiscount('Public', SkuID )
From SKU
Thanks for your time!
Martin****