title: Using Clone() to duplicate an ASP.NET MVC / EntityFramework model object
body: <p>I've read <a href="https://stackoverflow.com/questions/5443384/why-use-clone">this question</a> about using <code>Clone()</code> and want to know if what I'm after will be achieved.  My understanding from reading that question is that <code>Clone()</code> does a shallow copy, however reading elsewhere led me to believe differently, and now I'm confused.</p>
  
  <p>Our project has a class <code>Rule</code> that has an <code>ICollection&lt;ICondition&gt; Conditions</code>.  We'd like to provide users with a shortcut method to duplicate an existing <code>Condition</code> and modify it rather than start from scratch.  To that end, we're providing a <strong><code>Copy To New</code></strong> button.  </p>
  
  <p><code>ICondition</code> looks like this:</p>
  
  <pre><code>interface ICondition
  {
      long ID { get; set; }
      string Description { get; set; }
      DateTime EffectiveDate { get; set; }
      string IfStatement { get; set; }
      string PriceVersion { get; set; }
      PriceDetail Pricing { get; set; }
      bool StandardOption { get; set; }
  }
  </code></pre>
  
  <p>Given what I've read about <code>Clone()</code>, I'm fairly confident it would work the way I expect by using <code>ICondition newCondition = conditionToCopy.Clone()</code>, though I'm unsure if <code>Pricing</code> would be duplicated correctly, since it's a complex data type.  </p>
  
  <p>So, the first part of my question is, "will this work?"  I would just try it and see, however <code>ICondition</code> (or really its underlying <code>Condition</code>) doesn't seem to provide a method for <code>Clone()</code>, which leads me to the second part of my question: can I leverage <code>IClonable</code> to enable this functionality?  If so, where?</p>
  
  <p>Is this the way?</p>
  
  <pre><code>public static class Condition : IClonable
  {
      ...
      public Condition Clone(Condition conditionToClone)
      {
          return new Condition 
          { 
              Description = this.Description,
              EffectiveDate = this.EffectiveDate,
              IfStatement = this.IfStatement,
              PriceVersion = this.PriceVersion,
              Pricing = this.Pricing,
              StandardOption = this.StandardOption
          }
      }
  }
  </code></pre>
  
  <p>And, given that as the answer, is there any utility to declaring <code>IClonable</code> as the interface?  Does it add any value?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>Based on the below answer, I decided to do this, which at least builds (and hopefully runs; haven't tried it yet):</p>
  
  <pre><code>public class Condition
  {
      ...
      public Condition Clone()
      {
          return (Condition)base.MemberwiseClone();
      }
  }
  </code></pre>
  
  <p>I still don't see the need for <code>ICloneable</code>, so have left it out. The compiler was complaining about it anyway, something about the base class not being <code>object</code>.</p>