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 procedure:
var spResults = context.LTM_Lease_DeleteSubFiles(...)
BACKGROUND 2: my stored procedure DOIOwnerChanges_Apply sets return value with RETURN command at the end of the stored procedure.
PROBLEM 2: my call returns the value of 8 which is not even found in the stored procedure:
var spResults = context.DOIOwnerChanges_Apply(...)