title: How to generate unique order number?
body: <p>I'm looking for a good way to generate a unique order ID. Can you see any problems with the code below?</p>
  
  <pre><code>int customerId = 10000000;
  
  long ticks = DateTime.UtcNow.Ticks;
  
  long orderId = customerId + ticks;
  
  int orderNumber = orderId.GetHashCode();
  </code></pre>
  
  <p>I'm going to check that the number is unique in the database before creating the order.</p>