I have the following database structure:
Event table
Id – Guid (PK)
Name – NVarChar
Description – NVarChar
SpecialEvent table
Id – Guid (PK)
StartDate – DateTime
EndDate – DateTime
I have an abstract Event class, and a SpecialEvent class that inherits from it. Eventually I will have a RecurringEvent class which will inherit from the Event class also. I’d like to map the SpecialEvent class while preserving a one-to-one relationship mapped with the Ids, if possible. Can anybody point me in the correct direction? Thanks!
I figured my problem out. Here is my code: