title: DTO vs Business objects in WCF layer
body: <p>We have two projects in our application:</p>
  <ol>
  <li>Web UI project (aspx pages).</li>
  <li>WCF project.</li>
  </ol>
  <p>Both of these sections will further call the same BL and DAL layer. Here is the architecture:</p>
  <p><strong>Web Project</strong>:</p>
  <p><img src="https://i.stack.imgur.com/45ZeX.png" alt="enter image description here" /></p>
  <p><strong>WCF Project(which will be using REST):</strong></p>
  <p><img src="https://i.stack.imgur.com/OtFhB.png" alt="enter image description here" /></p>
  <p>Example of Business object and DTO mentioned above:</p>
  <pre><code>public class User
  {
      public int UserID { get; set; }
      public string UserName { get; set; }
      public string FirstName { get; set; }
      public string LastName { get; set; }
  }
  
  public class UserDTO
  {
      public int UserID { get; set; }
      public string UserName { get; set; }
      public string FirstName { get; set; }
      public string LastName { get; set; }
  }
  </code></pre>
  <p>Is it worth to have a separate data transfer object UserDTO.cs for WCF REST layer? We are already having User.cs as a Business object which is being used by Web project, BL and DAL. Further, in our WCF REST layer we are using DTO just for input prams:</p>
  <pre><code>  public MyResponse CreateUser(User user)
          {
  </code></pre>
  <p>and from this method we are converting the DTO to Business object (i.e UserDTO to User.cs object) via some mapper and passing it to BL layer which accepts only Business objects and not DTO. i.e from the point WCF is passing the Business object to BL and DAL, it behaves exactly the way UI passes the Business object to BL and DAL layer.</p>
  <p><strong>Is there any practically advantage using 2 separate data transfer objects</strong>? I have asked this question because IMO this will be redundant and we should go with one data trasnfer object i.e. Business object for both the Web project and WCF project.</p>