Hi there,
I'm working on an event-planning application for the contacts in a phone book. Avoiding all the public virtual
and protected
stuff, my Contact
class looks like:
class Contact {
//...
Int32 Id { get; private set; } //primary key;
String Name { get; private set; }
//...
}
A customer asked me to handle both his own phone book and my application's one. So I thought to extract an IContact
interface from Contact
, and to add another class InternalContact
(this name sucks, I know), implementing the same interface. The problem is that the customer's db uses an assigned string as a primary key, so Contact
''s Id type and InternalContact
's Id type will be different. Is it possible to map the Invitation.Contact
property using an <any>
type mapping, even is the Id types are different?
Thanks in advance, Giulio