title: Service Reference Auto Generating Response/Request
body: <p>I have a Wcf Project that is using Linq to Sql -- Serialization Mode = unidirectional with a Wpf Project and a MVC 4 Project.</p>
  
  <p>I have a class library that is holding the dbml for the Linq Classes.</p>
  
  <p>And another Class Library that hold the ViewModels for the Wpf Application</p>
  
  <p>I can add a service reference to the Class Library that holds the ViewModels and access the Wcf methods like normal</p>
  
  <pre><code>client.DoStuff()
  </code></pre>
  
  <p>Below is the Reference Configuration for the ViewModel C;ass Library</p>
  
  <p><img src="https://i.stack.imgur.com/GXB2T.png" alt="enter image description here"></p>
  
  <p>That generates the Correct Reference.Cs</p>
  
  <pre><code>  [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IMyWebService/DoStuff", ReplyAction="http://tempuri.org/IMyWebService/DoStuffResponse")]
    MyDataProject.Data.DatabaseModels.DoStuff[] DoStuff();
  </code></pre>
  
  <p>When I create a Web Reference for the Mvc project: </p>
  
  <p>(Same Configuration as above but with a Different ReferenceName)</p>
  
  <p>When executing the same </p>
  
  <pre><code>client.DoStuff()
  </code></pre>
  
  <p>I get the error -- Method "DoStuff" has 1 parameter but is invoked with 0 arguments.</p>
  
  <p>Then I look at the Reference.cs file </p>
  
  <p>And the method looks like this:</p>
  
  <pre><code>    [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IMyWebService/DoStuffResults", ReplyAction="http://tempuri.org/IMyWebService/DoStuffResultsResponse")]
      [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
      MyWebProject.MyWebSiteReference.DoStuffResultsResponse DoStuffResults(MyWebProject.MyWebSiteReference.DoStuffResultsRequest request);
  </code></pre>
  
  <p>Unchecking Reuse types in referenced assemblies allows me to access the method normally, but then I get type mismatches.</p>
  
  <p>Is their a step I am missing for using Wcf in Mvc?</p>
  
  <p>EDIT-- I updated the Reference I am using for the Wpf client that generates the correct .cs</p>
  
  <p>Then I tried this per replies</p>
  
  <p><img src="https://i.stack.imgur.com/Dmw0a.png" alt="enter image description here"></p>
  
  <p>That generates this </p>
  
  <pre><code>    [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IMyWebService/DoStuff", ReplyAction="http://tempuri.org/IMyWebService/DoStuffResponse")]
      MyWebProject.MyWebSiteReference.DoStuffResponse DoStuff(MyWebProject.MyWebSiteReference.DoStuffRequest request)
  </code></pre>