I am feeling a bit challenged here.
Lets say the I have the following classes
Code:
interface IFoo
{
string Foo{get;set;}
}
abstract class FooBase : IFoo
{
string Foo {get;set;}
}
absract class BarBase
{
ITItem Bar{get;set;}
}
class T1 : FooBase { }
class T2 : BarBase, IFoo
{
string Foo{get;set;}
}
Now, How do I persist this?
If I Put FooBase in one table and BarBase I have the problem where the BarBase.Bar can be either a FooBase or a BarBase. So, the only answer is to stick these things in the same table.
That seems a bit problematic, lets say I have 20 different interfaces to implement, do I have to stick them all in some base "entity" table? Thats the solution I am headed toward. It seems very ugly from a 3nf viewpoint.