title: Set Properties that not null using linq and reflection
body: <p>I have a <code>Update</code> method like this:</p>
  
  <pre><code>public void Update(MyClass item, System.Linq.Expressions.Expression&lt;Func&lt;MyClass, bool&gt;&gt; exp)
  </code></pre>
  
  <p>and I update status field like this:</p>
  
  <pre><code>MyClass  u = ent.MyClass.Where(exp).FirstOrDefault();
  if (u == null)
  {
      throw new Exception("No Record Found");
  }
  else
  {
      u.Status=item.Status;              &lt;-------
      ent.SaveChanges();
  }
  </code></pre>
  
  <p>ok ,the problem is I want to use this update method for various updates for example user may want to update <code>status,Name</code> or <code>Tel,fax,Address,name</code> and ...</p>
  
  <p>I want to check I property isn't null it assign to similar property of selected object(in line that show with arrow). How I can to this automatically ? I don't want wtite like this:</p>
  
  <pre><code>if(item.Status != null)
  {
       u.Status = item.Status;
  }
  if(item.Name != null)
  {
       u.Name = item.Name;
  }
  ,....
  </code></pre>
  
  <p>thanks</p>