Elegant syntax for assigning value from possibly null db value
<p>For some context, the record class SaleAmount property is</p>

<pre><code>public decimal? SaleAmount
{
    get;
    set;
}
</code></pre>

<p>Ideally I would go with this</p>

<pre><code>record.SaleAmount.Value = 
sql.Reader.IsDBNull(IDX_SALEAMOUNT) ? null : 
    sql.Reader.GetDecimal(IDX_SALEAMOUNT);
</code></pre>

<p>Alas the compiler and this are not friends because...</p>

<p><em>Type of conditional expression cannot be determined because there is no implicit conversion between '' and 'decimal'</em></p>

<p>So how would you express this elegantly, and dont play the obvious card like below...</p>

<pre><code>if (!sql.Reader.IsDBNull(IDX_SALEAMOUNT))
    record.SaleAmount = sql.Reader.GetDecimal(IDX_SALEAMOUNT);
</code></pre>

<p>Or is above the best solution?</p>
