>public class ABusinessRule : mmBusinessRule >{ ... > #region validate specific data type methods > > public string ValidateDuplicateOrder<EntityType>( > ABusiness<EntityType> oBusiness, > string order, > string sku) > where EntityType : mmBusinessEntity, new() > // the right type > // but, what does "new()" do, or mean? > { > int recsFound = oBusiness.GetDuplicateOrder(order, sku); > > if (recsFound > 0) > AddErrorProviderWarning(...) > } >>So, in a Order Type Business Rule:
>public partial class OrderType1Rules : ABusinessRule >{ ... > public string ValidateDuplicateOrderType1( > string order, > string sku) > { > // note the casting of the business rule's HostObject to a compatible type > return ValidateDuplicateOrder((OrderType1)this.HostObject, order, sku); > } >>