views:

49

answers:

0

Hello

I've been googling around on L2S inheritance, and I think I have a fair idea of the limitations/what I have to do, but just looking for some confirmation from the community.

I have a REAL BASIC setup here:

public abstract class BusinessObject
{
  public int Id { get; set; }
}

[Table]
public class Customer: BusinessObject
{

}

etc..

So all my classes descend from BusinessObject. I don't want a BusinessObject table in my database, for obvious reasons, so normal examples (Person|Contact|Employee) that illustrate this are out.

So without the discriminator, is there any way I can do this? I considered doing this in my descendant classes:

public class Customer: BusinessObject
{
  [Column]
  public new int Id { get; set;}
}

But that's hackery.

So can I do this using attribute mapping or should I switch to DBML? And do I actually need a BusinessObject table/discriminator columns? :(

Thanks Duncan