Matt,
Override the factory CreateEntityObject()and put a decision in there. You could set a property to drive the decision as one method.
Tim
>I read in the Dev Guide about "Working with Different Shaped Entities", and I think I need to do this in a few cases, so... How do you tell the Business Object *WHICH* Entity to use when it is instantiated? I see how to create additional Entity "shapes" using the Business Layer Generator, but how do I create an instance of a my Customer BO on one form that is based on the default Entitiy, but also have a Customer BO on another form that is based off a different Entity definition?
>
>In looking at my Customer.cs code file for the Customer BO, it seems to pretty much be hard-coded to use the default CustomerEntity entity class.
>
>Also, can you switch between Entities within one instance of a BO object?
>
>Code below is from Customer.cs:
>
>
> public partial class Customer : ABusinessObject
> {
>
> #region Association Properties
>
> ///
> /// Business Entity object
> ///
> public override CustomerEntity Entity
> {
> get
> {
> if (this._entity == null)
> {
> this._entity = this.CreateEntityObject();
> }
> this._entity.SetDataRow(this.DataRow);
> return this._entity;
> }
> set
> {
> this._entity = value;
> if (this._entity != null)
> this.DataRow = this._entity.GetDataRow();
> else
> this.DataRow = null;
> }
> }
> private CustomerEntity _entity;
Timothy Bryan