I have a CSP that does a SELECT and then an UPDATE within a transaction. Unfortunately, it looks like something in this procedure is causing nettiers to generate a method that returns void. I was hoping it would return my particular entity. I got the feeling that the syntax of my procedure is causing this problem. However, I'm not sure what it is. Could someone take a look at the CSP below?
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[_SequenceNumber_GetCurrentValueAndIncrement]
@Code nvarchar(50)
AS
BEGIN
SET NOCOUNT ON;
BEGIN TRY
BEGIN TRANSACTION
SELECT Id, Code, StartValue, EndValue, CurrentValue
FROM Core.SequenceNumber
WHERE Code = @Code
UPDATE Core.SequenceNumber
SET CurrentValue = CurrentValue + 1
WHERE Code = @Code
COMMIT TRANSACTION
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION
END CATCH
END