Saturday 1 June 2013

"Error 3027: No mapping specified for the following EntitySet/AssociationSet ..." - Entity Framework headaches

If you are developing model-first with Entities Framework (EF) then you may run into this annoying error at times:

Error 3027: No mapping specified for the following EntitySet/AssociationSet [Entity or Association Name]

This may make no sense when everything looks fine on the EDM, but that's because this error has nothing to do with the EDM usually. What it should say is "regenate your database files".

You see, Entities checks against the SSDL and MSL during build so if you just changed your EDM but doesn't use "Generate Database Model..." then it complains that there's stuff missing in your sql scripts.

so, in short, the solution is:

Don't forget to  "Generate Database Model..." every time after you update your EDM if you are doing model first development!

2 comments:

  1. Good and Helpful post ........you have direct point to point answer .........that's good

    i am also having a blog here
    http://www.geeksprogrammings.blogspot.in

    ReplyDelete
  2. It save my precious time. Thanks!!!

    ReplyDelete