in Entity Framework

Unable to update the EntitySet because it has a DefiningQuery and no element exists in the element to support the current operation.

I came across this error Unable to update the EntitySet because it has a DefiningQuery and no element exists in the element to support the current operation.. This was because there was a change in the database but it wasn’t reflected in the EDMX file. The exact details was a relationship was deleted but the change wasn’t picked up in the Entity Framework which caused the error.