I am having to interface some C# code with SQL Server and I want to have exactly as much precision when storing a value in the database as I do with my C# code. I use one of
The short answer is that C# decimal is a 128 bit floating point precision number and it does not have an exact equivalent in Sql Server.
May be in a future Sql Server version, Microsoft will match both its products and support a straight forward [clr / c# decimal equivalent] of 128 bit floating point precision number, to directly persist on its Database Server.
I had this analysis problem when dealing with very large and very small quantities. In my case, all comparing quantities within my solutions are inside the 64 bit range that [c# double / sql float] can handle. So, I've chosen to use [c# double / sql float] when dealing with quantities, and [c# decimal / sql money] when dealing with the financial part of my solutions.