locked
EF 4.0 "Generate Database From Model" RRS feed

  • Question

  • Hallo,

    I have a Model with 2 inherited Entities (Product, ConcreteProduct). I generate a SQL DDL using "Generate Database From Model" (SQL Compact Server 3.5 SP1).

    If I'll add a new "ADO.NET Entity Data Model" using the generated Database I get an Association and no Inheritance.

    My Question is now, what is the "best" table design solution for inheritence in EF Framework?

    Here the generated Code VS 2010:

    ....

    ALTER TABLE [ConcreteProducts]
    ADD CONSTRAINT [FK_ConcreteProduct_inherits_Product]
        FOREIGN KEY ([ID])
        REFERENCES [Products]
            ([ID])
        ON DELETE NO ACTION ON UPDATE NO ACTION;
    GO

    ...

    thx

    Martin

    Thursday, April 29, 2010 2:06 PM

Answers

All replies