title: New instance in RIA Domain Service
body: <p>I'm using .NET RIA Services July Preview to communicate between my Silverlight client and my server. On my server I have an ASP.NET project hosting the Silverlight application. In the ASP.NET application I have a Linq-to-Sql DataModel with a table called Hour. I have extended the Hour entity with 3 properties by creating Hour.shared.cs:</p>
  
  <pre><code>public partial class Hour
  {
     public string CustomerName { get; set; }
     public string ProjectName { get; set; }
     public string FullProjectName { get { return this.CustomerName + " - " + this.ProjectName; } }
  }
  </code></pre>
  
  <p>In my domainservice I have a get-method called GetHours. Due the design in Linq, I cannot explicit create a new instance of the Hour entity and through the new entity set the values of my new properties:</p>
  
  <pre><code>var query = from hours in this.Context.Hours
              select new Hour()
              {
                 HourID = hours.HourID,
                 ProjectName = "Hello World"
              };
  </code></pre>
  
  <p>If I just select hours it works just fine but I need to set the ProjectName and CustomerName some how.</p>
  
  <p>Any ideas about how to get around this?</p>