title: Create Query without entity framework
body: <p>I have the following code, but I can’t work out what I need to put in place of the // before <code>.AddObject(Model);</code> and <code>.SaveChanges();</code> to get the method to work. It’s a create query but I’ve only ever done this while using the Entity Framework before now, in this case I’m not using EF.</p>
  
  <pre><code>[HttpPost]
  public ActionResult Registration(UserDetailModel Model)
  {
      if (ModelState.IsValid)
      {
          Model.UserNameFK = User.Identity.Name;
          Model.CompanyName = "CompanyName";
          Model.IEMI = "IEMI";
  
          //.AddObject(Model);
          //.SaveChanges();
  
          return RedirectToAction("Registration", "Home");
      }
  
      return View(Model);
  }
  </code></pre>
  
  <p>Am I close?</p>
  
  <p>Cheers,</p>
  
  <p>Mike.</p>