Update database with the new entity created in the designer RRS feed

  • Question

  • Hello,

    I don't know if it's possible to update a database with the new entity created in the designer.

    when I click on the "generate database from model" I get error message that say:

    Error 11007: Entity type 'Air' is not mapped. 

    what I did is I have created my edmx from the existing database then added in the designer a new entity "Air" and wanted now to update the database (create new table "air") with changes I did in the designer.

    it seems it as not been designed to work like that and changes will have to be done on the database first.

    any help will be welcomed

    Tuesday, January 24, 2012 2:21 PM


  • The built-in tools are not very good at handling incremental model changes; the "generate database from model" command is good at creating a new database from scratch but it can not handle just adding a new entity to a model (or new members to an entity).

    There are however third-party tools that add this capability to the EF designer in VS, one such tool is my "model comparer" for EF which you can see in action here:

    If you want to try it out, you can download it and get a trial license from

       Cool tools for Linq-to-SQL and Entity Framework 4: - Visual Studio add-in with loads of new features for the Entity Framework and Linq-to-SQL designers - Runtime SQL query profiler for Linq-to-SQL and Entity Framework v4
    Wednesday, January 25, 2012 1:36 AM

All replies