Create a Variable to Store BusinessBase(of T)

Create a Variable to Store BusinessBase(of T)

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


mikeclimbs posted on Tuesday, August 29, 2006

I'm creating a generic form to Edit BO's.  I'm using vb and csla 2.1. I'm hoping to pass the form a BO and have generic save btn that calls bo.save.

I can't figure out how to declare a public variable I can place any Businessbase of T in.  I was able to use core.businessbase, but it doesn't expose save.  I also tried to cast my object to businessbase with no success

I'm new to vb just moved from delphi so I maybe missing something obvious.

I searched the forum and found some discussion of this, but the solutions seemed overly complicated.

Thanks,

Mike

 

ajj3085 replied on Tuesday, August 29, 2006

Try using the ISavable interface instead of BusinessBase<T>.

xal replied on Tuesday, August 29, 2006

You can use Csla.Core.ISavable for that purpose.

Andrés

mikeclimbs replied on Tuesday, August 29, 2006

Thanks,  Csla.Core.ISavable did the trick. 

I'm still passing it as csla.core.businessbase and casting as Isaveable when I need to save.  This gives me access to some of the other businessbase functionalty.

 

Mike

Copyright (c) Marimer LLC