title: LINQ to SQL Insert Sequential GUID
body: <p>I have a database that is part of a Merge Replication scheme that has a GUID as it's PK.  Specifically the Data Type is <em>uniqueidentifier</em>, Default Value <em>(newsequentialid())</em>,  RowGUID is set to <em>Yes</em>.  When I do a InsertOnSubmit(CaseNote) I thought I would be able to leave CaseNoteID alone and the database would input the next Sequential GUID like it does if you manually enter a new row in MSSMS.  Instead it sends <em>00000000-0000-0000-0000-000000000000</em>.  If I add <code>CaseNoteID = Guid.NewGuid(),</code> the I get a GUID but not a Sequential one (I'm pretty sure).</p>
  
  <p>Is there a way to let SQL create the next sequential id on a LINQ InsertOnSubmit()?</p>
  
  <p>For reference below is the code I am using to insert a new record into the database.</p>
  
  <pre><code>            CaseNote caseNote = new CaseNote
                                  {
                                      CaseNoteID = Guid.NewGuid(),
                                      TimeSpentUnits = Convert.ToDecimal(tbxTimeSpentUnits.Text),
                                      IsCaseLog = chkIsCaseLog.Checked,
                                      ContactDate = Convert.ToDateTime(datContactDate.Text),
                                      ContactDetails = memContactDetails.Text
                                  };
          caseNotesDB.CaseNotes.InsertOnSubmit(caseNote);
  
          caseNotesDB.SubmitChanges();
  </code></pre>
  
  <hr>
  
  <p>Based on one of the suggestions below I enabled the Autogenerated in LINQ for that column and now I get the following error --> <em>The target table of the DML statement cannot have any enabled triggers if the statement contains an OUTPUT clause without INTO clause.</em>
  Ideas?</p>