Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refactoring
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Divers
Thread ID:
01428495
Message ID:
01428556
Vues:
38
Hmm...didn't quite work. I did
 abstract class Reg : ABusinessObject<ABusinessEntity>
    {
        
    }
but my actual class definition doesn't compile now.
public partial class Reg_Golf : Reg
	{
		
		#region Association Properties

		/// <summary>
		/// Business Entity object
		/// </summary>
-------->	public override Reg_GolfEntity Entity
The error on the highlighted line there is
Error	3	'Wala.Membership.Business.Reg_Golf.Entity': type must be 'Wala.Membership.Business.ABusinessEntity' to match overridden member 'OakLeaf.MM.Main.Business.mmBusinessObjectGeneric<Wala.Membership.Business.ABusinessEntity>.Entity'	
I try various ways to define the class, such as
public partial class Reg_Golf : Reg<Reg_GolfEntity>
and
public partial class Reg_Golf : Reg<ABusinessEntity>
but nothing makes it happy.



>That sounds good. So I tried:
>
>namespace Wala.Membership.Business
>{
>    
>    public partial class Reg : ABusinessObject<ABusinessEntity>
>    {
>
>    }
>
>      
>}
>
>
>and then changing
>
>namespace Wala.Membership.Business
>{
>	public partial class Reg_Seminar : Reg
>	...
>
>
>I see that I had to explicitly cast some types down below. Should that do it?
>
>Thanks so much!
>
>Eric
>
>>>
>>
>>You currently have ABusinessObject as your base class for these. You could put the functionality in the AbusinessObject class or you could create another ABusinessObjectReg (or whatever name) class that is identical to ABusinessObject and then extend it. Then just change the three classes to inherit that one instead of the ABusinessObject class.
>>Tim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform