never done this before, I guess another time it's gonna be the first time :)
programming keeps me an eternal virgin, in a way ;)

On Thu, Nov 20, 2008 at 12:30 PM, Roger Kratz <[EMAIL PROTECTED]> wrote:
> Creating your own IUserType for IPayment would do the trick I guess.
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jan 
> Limpens
> Sent: den 20 november 2008 15:15
> To: [email protected]
> Subject: [nhusers] difficult (?) mapping with components and interface
>
>
> I have a class Purchase (used by nh) that has an IPayment
>
> Currently I am having two implementations of that interface:
>
>        public class BankPayment : IPayment
>        {
>                public int NumberInstallments
>                {
>                        get { return 1; }
>                }
>        }
>
>        public class CreditCardPayment : IPayment
>        {
>                public CreditCardPayment(Creditcard card, int 
> numberInstallations,
> Address billingAddress)
>                {
>                        Card = card;
>                        NumberInstallments = numberInstallations;
>                        BillingAddress = billingAddress;
>                }
>
>                public Creditcard Card { get; private set; } // a component, 
> as well
>                public int NumberInstallments { get; private set; }
>                public Address BillingAddress { get; private set; } // another 
> component!
>        }
>
> how can I map this as a component to Purchase? I truly have no idea...
>
> --
> Jan
> ___________________
> [EMAIL PROTECTED]
> www.limpens.com
> +55 (11) 3082-1087
> +55 (11) 3097-8339
>
>
>
>
> >
>



-- 
Jan
___________________
[EMAIL PROTECTED]
www.limpens.com
+55 (11) 3082-1087
+55 (11) 3097-8339

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to