I have 1 BO let said Project_BO.vb. It inherits Project.vb.
In GetProject function, I use Project_BO.GetQuotation(id) instead of Project.GetQuotation(id) .
And it return an error message
Exception Details: System.InvalidCastException: Unable to cast object of type 'ProjectTracker.Library.Project' to type 'ProjectTracker.Library.Project_BO' .
Line 184: Return CType(businessObject, Project_BO)
Thanks for helping.
It is difficult to do inheritance from a non-generic type, when the higher base classes are generic.
BusinessBase<T> is generic, and T is the type that inherits from BusinessBase<T>, and so there's code at that level that expects T to be your business type (Project). By subclassing Project, you are confusing the base class (and maybe the data portal).
You really have two options.
Copyright (c) Marimer LLC