Error 11007: Entity type '[table name]' is not mapped


  • Hi All:

    I'm new to the EF and and trying to convert a typed dataset to an EDM.  Once of the concepts I am trying to duplicate (which is easy to do with typed datasets) is to load the main data (records) from the database and manually load the lookup tables in code.  With my edm, I have mapped the main table to the database using the designer (Update Model From Database) and then manually added an Entity to store the lookup values and created an association between the two.  However, when I try and compile (or Validate the edm) I get the subject error with the non-mapped entity.

    Is what I am trying to do even possible with the EDM, or do all the entities have to be mapped to a physical table in the database?


    Friday, February 13, 2009 8:39 PM


All replies

  • Hi Doug -

    In the EF, all entities must be mapped to tables, and all properties of an entity must be mapped to database columns.

    If you run the model-generation wizard, and point it to your database, you will get a valid, workable EF model.  If there are foreign keys in your database, these will be replaced with  "navigation properties" and "associations" between the related entities in your entity data model.

    You can review Diego's blog post on databinding with the EF for more info:


    Mike Kaufman
    Microsoft Corp.

    This posting is provided "AS IS" with no warranties, and confers no rights
    Friday, February 13, 2009 9:35 PM
  • Hi Mike:

    Based on your reply, that means I will not be able to duplicate the functionality I need that is supported by typed datasets but not the edm.

    Do you know if there are any plans to support this (or similar) functionality in the future for the edm?

    Saturday, February 14, 2009 7:20 PM

  •  Hi Doug -

    We're working now to support exposing foreign keys as properties in the model.   



    This posting is provided "AS IS" with no warranties, and confers no rights
    Wednesday, February 18, 2009 4:47 PM