title: How to setup the decimal places in asp.net core?
body: <p>I'm getting crazy with decimal places in asp.net core.</p>
  
  <p>Sql Server table:</p>
  
  <pre><code>money decimal (18,0)   
  </code></pre>
  
  <p>I put in Startup.cs /Configure </p>
  
  <pre><code>var cultureInfo = new CultureInfo("vi-VN");
          cultureInfo.NumberFormat.CurrencySymbol = "đ";
          cultureInfo.NumberFormat.CurrencyDecimalDigits = 0;
          cultureInfo.NumberFormat.CurrencyDecimalSeparator = ",";
          cultureInfo.NumberFormat.CurrencyGroupSeparator = ".";
  
  
          CultureInfo.DefaultThreadCurrentCulture = cultureInfo;
          CultureInfo.DefaultThreadCurrentUICulture = cultureInfo;
  
          var supportedCultures = new[]
          {
              cultureInfo
          };
  
          app.UseRequestLocalization(new RequestLocalizationOptions
          {
              DefaultRequestCulture = new RequestCulture("vi-VN"),
              // Formatting numbers, dates, etc.
              SupportedCultures = supportedCultures,
              // UI strings that we have localized.
              SupportedUICultures = supportedCultures
          });
  </code></pre>
  
  <p>However, when I get any decimal value, it's always in 2 decimal places. </p>
  
  <p>On View:</p>
  
  <p><code>&lt;input asp-for="money"/&gt;</code> => show something like 123455,00. and this value will be submitted back to the controller for calculation, so it should be in numeric format, not in string format like ToString("N0")...</p>