title: How to add properties to linq2Sql ORM Table
body: <p>In my SQL table I have two properties, StartDateTime and EndDateTime, and in my code I have the Linq2Sql ORM table with it's mapped corresponding StartDateTime and EndDateTime. I decided to add a duration as such: </p>
  
  <pre><code>public TimeSpan Duration
  {
     get
     {
        TimeSpan ts =(TimeSpan) (EndDateTime - StartDateTime);
        return ts;
     }
  }
  </code></pre>
  
  <p>This works, but when I   modify my dbml file via the designer the additions of course disappear as the files are rewritten. 
  My question is what would be a best practice for adding a duration property, I don't really want to add it to the source SQL Table as it seems redundant to have it there.</p>
  
  <p>Update:
  since the created ORM table is defined as "public partial class" I created an additional code file to keep my class additions in such as in the case of the added property "Duration".  </p>