EF CodeFirst: Either the parameter @objname is ambiguous or the claimed @objtype (COLUMN) is wrong

This is because of name Conflict of Class (Model) names with other reserved or generated ones, when auto creates the tables and … .

Considering that EF Code First creates the intervene tables to relate 2 or more tables using name of tables for derived intervene table, so when you use a class name that employs a name like the intervene tables, we’ll get such this ambiguous error.

For example if you have a Question class which has an Answer navigation property the internal model metadata will contain a reference called QUESTION_ANSWER

To solve this, try to change the class names (used for generating tables) and ensure their uniqueness.

Leave a Comment