title: Value too long or small error when parsing int
body: <p>When i am trying to save a int value on entity framework i am getting following error-</p>
  
  <blockquote>
    <p>System.OverflowException: 'Value was either too large or too small for
    an Int32.'</p>
  </blockquote>
  
  <p>Note the value is something like- 9093739202727</p>
  
  <p>Is there any better way then that to process that value?</p>
  
  <p><a href="https://i.stack.imgur.com/0walF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0walF.png" alt="pic"></a></p>
  
  <p>Code:</p>
  
  <pre><code>if (result.responseCode.ToString() == "APPROVED")
  {
      var sub = new Subscriptions();
      sub.UserEmail = result.merchantOrderId;
      sub.SaleNumber = Int32.Parse(result.orderNumber.ToString());
      sub.LastTransectionId = Int32.Parse(result.transactionId.ToString());
      sub.LastUpdatedTime = DateTime.Now;
      if (twoCheckout.ProductTypeId == "m")
      {
          sub.ExpirationDate = DateTime.Today.AddMonths(1);
      }else if (twoCheckout.ProductTypeId == "y")
      {
          sub.ExpirationDate = DateTime.Today.AddYears(1);
      }
      sub.Status = false;
      db.Subscriptions.Add(sub);
      db.SaveChanges();
  }
  </code></pre>