Cannot see stored procedure in Entity Framework model?
- September 24th, 2010
- Posted in .NET . Entity Framework . Full Text Search . SQL Server 2008 . Visual Studio 2010
- Write comment
Unfortunately I could not see the stored procedure in the list of items to be added when refreshing the model from the database. I have been implementing a stored procedure/inline-table function to facilitate a Full Text Search (FTS) in SQL Server 2008 using ADO .NET Entity Framework (EF).
The cause was that the EF connection did not have Control/Execute permissions on the function/procedure. Grant these permissions to the user utilised in your EF connection string and it will pop-up in the list of stored procedures to be added when you go back to update the model.
Once that is done you can then map the proedure/function results to your entities or a complex type. This is accomplished by selecting Add function import when right-clicking anywhere in the EDMX Designer View or the stored procedure in the Model View.
No comments yet.