title: Service isn't implementing interface member noobie
body: <p>I am re engineering an MVC3 app to take all linq out of controllers and in to proper layers.</p>
  
  <p>I have got this as my structure SQL --> EF --> Repository --> Service --> Controller. I am using interfaces.</p>
  
  <p>When compiling I am getting this error:</p>
  
  <p>gpc.data.service.roleService does not implement interface member gpc.data.interfaces.iroleservice.HolderNamesbyRoleID(int).</p>
  
  <p>I am totally new to proper architecture so apologies if this is blindingly obvious lol. Here is some code:</p>
  
  <p>Repository:</p>
  
  <pre><code>namespace gpc.Data.Repositories
  {
  public class roleRepository :gpc.Data.Interfaces.IRoleRepository
  {
  private gpc.Models.gpcEntities _entities = new Models.gpcEntities();
  
  
  public HolderNames HolderNamesbyRoleID(int roleid)
  {
  return (from i in _entities.HolderNames
  where i.roleid == roleid select i).FirstOrDefault();              
  }
  }
  }
  </code></pre>
  
  <p>I then have an interface:</p>
  
  <pre><code>namespace gpc.Data.Interfaces
  {
  public interface IRoleRepository
  {
  HolderNames HolderNamesbyRoleID(int roleid);
  }
  }
  </code></pre>
  
  <p>Then I have the service:</p>
  
  <pre><code>namespace gpc.Data.Service
  {
  public class roleService : gpc.Data.Interfaces.IRoleService
  {
      private ModelStateDictionary _modelState;
      private gpc.Data.Interfaces.IRoleRepository _repository;
  
      public roleService(ModelStateDictionary modelState)
      {
          _modelState = modelState;
          _repository = new gpc.Data.Repositories.roleRepository();
      }
      public roleService(ModelStateDictionary modelState,                                    
      gpc.Data.Repositories.roleRepository repository)
      {
          _modelState = modelState;
          _repository = repository;
      }
  
  
      public HolderNames HolderNames(int roleid)
      {
          return _repository.HolderNamesbyRoleID(roleid);
      }
  }
  }
  </code></pre>
  
  <p>I then have another interface:</p>
  
  <pre><code>namespace gpc.Data.Interfaces
  {
  public interface IRoleService
  {
      HolderNames HolderNamesbyRoleID(int roleid);
  }
  }
  </code></pre>
  
  <p>I created a very simple ienumerable in this structure and I was able to get data on to the view through the controller as i would expect. I guess that as this one is a bit more complicated that a select everything and throw it at a view I must have missed something. I don't know if it makes a difference, but "holdernames" is a SQL view as opposed to a table.</p>
  
  <p>Any help greatly appreciated</p>