title: asp mvc update table row in database if exists, otherwise insert
body: <p>How can you check in ASP.NET MVC Razor if a table row exists in de database? if the table row  exists update it otherwise just add the object like the code below:</p>
  
  <pre><code>db.result.Add(object);
  </code></pre>
  
  <p>Thanks!</p>