Entity Framework (Database first) has incorrect return result from stored procedure [duplicate]
This question already has an answer here: Getting data from stored procedure with Entity Framework 4 answers Environment: Visual Studio 2017 SQL Server 2016 EF v6 with a database-first approach Background: the stored procedure is in the EDMX. My stored procedure sets the return value to 0 if nothing happened, 1 if something affected and value of @@ERROR if errors. BACKGROUND 1: my stored procedure, LTM_Lease_DeleteSubFiles , does SET NOCOUNT ON at the top and sets return value with RETURN command at the end of the stored procedure. PROBLEM 1: my call returns -1 which is not even in the stored