2

Problem: When I want to create controller from EF codefirst context it give me this error:

There was an error running the selected code generator.Unable to retrieve  metadata for Model.class name.Ambiguous match found.

See Error Image

What I did?

  1. As my model data was in seprate assembly I updated all package or downgrade them but nothing happened.
  2. Then I merged my Model assembly in Website project but error doesn't resolved.
  3. After googleing and many tricks, I created clean project and scaffolding for each class but it seems only one class had this problem.
  4. In that class I commented all property and uncomment one by one to find error.
  5. Found it! For this property error occurs public bool ISActive { get; set; }

I surprised so much and found how dot net turture you!! What do you think about solution?!!

RoLYroLLs
  • 3,113
  • 4
  • 38
  • 57
Seifolah
  • 341
  • 3
  • 14

1 Answers1

0

Renaming ISActive property to something else such as IsActivated solved my problem.It seems EF scaffolding has problem with this type of naming while cruding.

Seifolah
  • 341
  • 3
  • 14