title: C# LINQ update statement
body: <p>So i work according to the LINQ model and want to do an update using the where statement but i don't know how to pass my 2 ids down...</p>
  
  <p>This is my code...
  The sc from my form:</p>
  
  <pre><code>tblEvk p= new tblEvk();
              p.fk_externvakID = currentCategoryId;
              p.fk_studentID = 2;
  </code></pre>
  
  <p>The bll:</p>
  
  <pre><code> public void update(tblEvk p)
  {
      DALstudent.update(p);
  }
  </code></pre>
  
  <p>The DAL</p>
  
  <pre><code> public void update(tblEvk s)
  {
      var recordToUpdate = (from p in dc.tblEvks
                            where p.fk_studentID == id &amp;&amp; p.fk_externvakID = vakid
                            select p).Single();
  
      recordToUpdate.evkBijlageGepost = 1;
      dc.SubmitChanges();
  }
  </code></pre>
  
  <p>The question is how can i pass these variables? Using an insert i can just do public void insert (int id int vakid) but i cant do this with an update :(</p>