title: Asp.Net MVC 3 - Linq To Entities - PK with Null doesn't get inserted into the db (don't want null :))
body: <p>I'm using the latest Asp.Net MVC version.</p>
  
  <p>For some reason, when my POST (Action Create) in my controller gets hit.
  I can't seem to be able to add it to the entityset.</p>
  
  <p>What i have is, </p>
  
  <p>1) My EntityModel (*.edmx file)</p>
  
  <p>2) Controller which references the entity:</p>
  
  <pre><code>     private db.DataContainer _db = new db.DataContainer();
  </code></pre>
  
  <p>3) My method (i'm using Guid as pk):</p>
  
  <pre><code>   [HttpPost]
      public ActionResult Create(Client client)
      {
          try
          {
              client.Id = Guid.NewGuid();
  
              /* method 2
              Client cl = new Client();
              cl.Id = Guid.NewGuid();
              cl.email = client.email;
              cl.Adres = client.Adres;
              cl.companyName = client.companyName;
              cl.fax = client.fax;
              cl.phone = client.phone;
              */
              //    client.Id = Guid.NewGuid();
              _db.ClientSet.AddObject(client);
              _db.SaveChanges();
              return RedirectToAction("Index");
          }
          catch (Exception ex)
          {
              var ex_message = ex.Message;
              var ex_data = ex.Data;
              var ex_ix = ex.InnerException;
              return View();
          }
      }
  </code></pre>
  
  <p>4) Following is my InnerException:</p>
  
  <pre><code> [System.Data.SqlClient.SqlException] = {"Cannot insert the value NULL into column 'Id', table 'lst.dbo.ClientSet'; column does not allow nulls. INSERT fails.\r\nThe statement has been terminated."}
  </code></pre>
  
  <p>Both doesn't seem to work :(</p>