I've run into an issue when using a stored procedure that contains OUTPUT parameters of a decimal (or money) data type...it appears the value is getting converted to an integer and removing any decimal places (although it does round as per a convert)
Here is a simple SP that I used for testing:
CREATE
PROCEDURE
[dbo].[usp_Telerik_Test]
@curTestAmount
DECIMAL
(18,2)
OUTPUT
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET
NOCOUNT
ON
;
SET
@curTestAmount = 1234.55
END
GO
Added to the Domain Model and executing it with the following:
decimal
? curTestAmount =
null
;
this
.CurrentDataSource.Usp_Telerik_Test(
ref
curTestAmount);
Returns a value of 1235
If I initialise the curTestAmount to 999999999999.99 then the result is returned successfully as 1234.55, interestingly if I initialise it to 1111.1 then the returned value is 1234.6...also if I initialise it to 111.11 an 'Error converting data type decimal to numeric.' error is thrown on the ExecuteNonQuery call in the EntitiesModel.cs!
Let me know if you would like any further information.
Kind Regards,
Rob