
Entity Framework: Verify that the FunctionImport name is unique.
January 27, 2012Had to look this one up twice now, so time to blog it!
A Stored Procedure of ours accidently got deleted when we ran an Update Model from Database… through our Entities.edmx file. I updated again and added the Stored Procedure back in. However, when I went to add the related Add Function Import… I got the following error message:
Although the Stored Procedure was accidentally removed, its related Function Import was still there. What I had to do was in my Model Browser, I expanded EntityContainer:Entities->Function Imports. Then I right clicked on the old Function Import and selected Delete.
After that, when I went back to add my Function Import, all was well.
Hat Tip Verify that the FunctionImport name is unique.

