title: mapping object in linq (asp.net)
body: <p>I want to map t and q .how can i do that? (In asp.net)</p>
  
  <p>I want to get t and map it to q for editing the record</p>
  
  <pre><code>public void EdittblUser(tblUser t)
  {
      var q = db.tblUsers.SingleOrDefault(u =&gt; u.userName == t.userName );
      //mapping here
      dbconnect.submitchange();
  }
  </code></pre>
  
  <p>some thing like this :</p>
  
  <pre><code> var user = 
      dbconnect.tblUsers.SingleOrDefault(u =&gt; u.userName == _VOUser.Username);
  
  if (user == null)
      // throw exception
  
  Mapper.Map(tbluser, user);
  dbconnect.SubmitChanges();
  return true;
  </code></pre>