title: How do I use the ExecuteQuery method properly?
body: <p>How do I use the method ExecuteQuery properly?</p>
  <p>I get the following information when trying to save an edit.</p>
  <blockquote>
  <p>An exception of type 'System.NotSupportedException' occurred in System.Data.Linq.dll but was not handled in user code</p>
  <p>Additional information: A query parameter cannot be of type '&lt;&gt;f__AnonymousType1`2[System.String,System.Int32]'.</p>
  </blockquote>
  <pre><code>    [HttpPost]
      [ValidateAntiForgeryToken]
  
      public ActionResult UpdateRegion()
      {
          AtlasDataContext db = new AtlasDataContext();
  
          var CurrRegionName = Request.Form[&quot;RegionName&quot;];
          var CurrRegionID = Convert.ToInt32(Request.Form[&quot;RegionID&quot;]);
  
          string UpdateQuery = &quot;update Regions set RegionName = '&quot;+CurrRegionName+&quot;' where RegionID = &quot;+CurrRegionID+&quot;&quot;;
  
          db.ExecuteQuery&lt;string&gt;(UpdateQuery, new { CurrRegionName, CurrRegionID });
  
          return RedirectToAction(&quot;Admin&quot;);
      }
  </code></pre>