title: SQL Server Decimal - Why is my decimal value only capturing two decimal places after the decimal? Yes, it's decimal(18,5)
body: <p>I'll just start by saying I have my decimal data type defined as decimal(18,5):</p>
  
  <p><img src="https://i.stack.imgur.com/7M8sd.jpg" alt="enter image description here"></p>
  
  <p>The values coming from my app before it hits the database are:</p>
  
  <p><img src="https://i.stack.imgur.com/3z7jE.jpg" alt="enter image description here"></p>
  
  <p>So as you can see so far, everything looks good.  I should see a value of 0.47588 in my database table for column <code>Capsule105</code>.  But, after my record saves to the database, I look at the record it inserted- take a look at the last row:</p>
  
  <p><img src="https://i.stack.imgur.com/yVxwH.jpg" alt="enter image description here"></p>
  
  <p>The value shouldn't stop after two decimal places.  It should go to the very last decimal place defined in my database, right?</p>
  
  <p>Here's my <code>InsertOrUpdate</code> method (came stock with the template in VS):</p>
  
  <pre><code>public void InsertOrUpdate(CalculatedResults calculatedresults)
  {
      if (calculatedresults.Pk == default(int)) {
          // New entity
          context.CalculatedResults.Add(calculatedresults);
      } else {
          // Existing entity
          context.Entry(calculatedresults).State = EntityState.Modified;
      }
  }
  </code></pre>
  
  <p>I'm using Code First approach and generating my database from my models.</p>
  
  <p>Any ideas what's going on here??? Please help!!</p>