title: C# How to assign an object returned from linq to 'this' reference?
body: <p>OK, this is the problem that I'm trying to solve - I want to assign object properities returned through linq from db, to this object prperties and get possibility to update any changes, without inserting new row in db.</p>
  
  <pre><code>partial class Employee : Person
  {
      public Employee(int id = 0)
      {
          if (id &gt; 0)
              this.get(id);
      }
  
      public override bool get(int id)
      {
          Employee empl = db.Employees.Single(Employee =&gt; Employee.id == id);
          if (empl != null)
          {
              // here I need to do sth like
              this = empl;
              // or
              ObjectProperties.Copy(empl, this);
              return true;
          }
          else
              return false;
      }
  
      public override void save()
      {
          if (this.id &gt; 0)
          {
              db.SubmitChanges();
          }
          else
          {
              db.Employees.InsertOnSubmit(this);
              db.SubmitChanges();
          }
      }
  
      public override void remove()
      {
          if (this.id &gt; 0)
          {
              db.Employees.DeleteOnSubmit(this);
              db.SubmitChanges();
          }
      }
  }
  </code></pre>
  
  <p>And I don't want to make get method static.</p>