hi everybody i am changing PlaceOrder() function to a StoredProcedure. there is no problem in debug mode in localhost but when i publish It in the server i have a problem with numeric Parameter
its The localhost Parameter result [{"OrderItemGuid":"a3547a23-f5d0-4e7c-a054-05b633209a1c","ProductId":"15","Quantity":"1","UnitPriceInclTax":"3619000.00",...
its The server Parameter result [{"OrderItemGuid":"a3547a23-f5d0-4e7c-a054-05b633209a1c","ProductId":"15","Quantity":"1","UnitPriceInclTax":"3619000/00",...
why the decimal seprator is "/" in the server !!!! wondering its "." again when i switch back to default placeOrder()
This could be a 'culture' setting on the server. (Although I'm not sure if it's the web server or SQL server, since you mention that you change code to use a stored procedure)
THANK YOU FOR YOUR RESPONSE. dear Yidna , its not because of currency setting , the localHost and server both connected to one database , and the currency setting is same for both of them.
dear NewYork , when I am passing parameter to the Sp (using dapper) error has raised.
the question is : one parameter with one value in Dapper is like this:(3619000/00) and in entityFrameWork is like this :(3619000.00)
The Entity Framework provider is likely doing the translate of decimals into correct format based on culture. Dapper is raw SQL. Your SQL can use an explicit Format with 'invariant culture - e.g.
SELECT FORMAT(123.45, 'N', 'iv')
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.