Hi!
That will work!
Thanks!
Sarosh
>Sarosh,
>
>>Just wondering what the correct approach would be in creating a Pre/Post Constructor Hook for BO's?
>
>You can add a hook method in ABusinessObject. For example:
>
>
public ABusinessObject()
>{
> this.DatabaseKey = "PostgresTest";
> this.HookInit();
>}
>
>public virtual void HookInit()
>{
>}
>
>I'm not sure that a "dual" hook is necessary here (pre/post) due to the specialness of constructor methods...they are automatically called from the top down (from System.Object down to your application-level class) and they are not inherited. At any rate, this provides a hook into which you can place constructor code that can be added to a partial class that is not overwritten.
>
>FYI, although we already generate all our business object classes as partial classes, we are adding the option to the BLG so it will generate these for you.
>
>Best Regards,