Search code examples
c#entity-frameworkstored-proceduresef-database-first

Entity Framework imports stored procedure despite that option is not selected


I've got a database which has lots of tables, views and stored procedures. When I try to Update model from database it takes also a stored procedure, although I didn't asked for it. Update Wizard When I compile the code it gives me errors, so I have to manually remove stored procedure from Context file: Compilation Errors

Added part to usings section:
usings section

Added part to the context file: context body

How to prevent getting that stored procedure?


Solution

  • Solved this problem by opening .edmx file in XML editor and removing all nodes containing sp_rt_Pivot function. Worked well, but seems it's a EF bug.