title: Not implementing interface member in service
body: <p>First of all I apologize if the references to this question are not correct.  </p>
  
  <p>I am developing a three-tier <code>MVC 3</code> application. In the business layer I need to create a service which will call the Data Access Layer, in order to retrieve a list of existing towns. </p>
  
  <p>My <code>ITown</code> interface is as follows; </p>
  
  <pre><code>[ServiceContract]
  public interface ITown
  {
      [OperationContract]
      IEnumerable&lt;Town&gt; GetAllTowns();
  }
  </code></pre>
  
  <p>In the <code>Town.svc.cs</code>, I am inserting as follows;</p>
  
  <pre><code>public class Town : ITown
  {
      public IEnumerable&lt;Common.Town&gt; GetAllTowns()
      {
          return new DATown().GetAllTowns();
      }
  }
  </code></pre>
  
  <p>The problem is in the above code.  I am getting an error under <code>Town</code> in the class declaration <code>public class Town : ITown</code>. </p>
  
  <pre><code>'Business.Town' does not implement interface member 'Business.ITown.GetAllTowns()'. 
  'Business.Town.GetAllTowns()' cannot implement 'Business.ITown.GetAllTowns()'
  because it does not have the matching return type of 'System.Collections.Generic.IEnumerable&lt;Business.Town&gt;'.
  </code></pre>
  
  <p>This is the content in my <code>DATown</code>;</p>
  
  <pre><code>public class DATown : Connection
  {
      //Constructor
      public DATown()
          :base()
      { }
  
      public IEnumerable&lt;Town&gt; GetAllTowns()
      {
          return entities.Town.AsEnumerable();
      }
  }
  </code></pre>
  
  <p>So basically what I am doing is calling the <code>GetAllTowns()</code> method of <code>DATown</code> from the <code>Town.svc.cs</code> class.</p>
  
  <p>I've searched around for other similar queries; mostly saying that there is a correct parameter in one of the methods. I do not think that this is the case with my code.</p>
  
  <p>I would appreciate if someone could help me figure out what is wrong.</p>
  
  <p>Thanks in advance.</p>