AccountModel into a Repository and Interface
Posted
by Jemes
on Stack Overflow
See other posts from Stack Overflow
or by Jemes
Published on 2010-04-27T13:37:43Z
Indexed on
2010/04/27
13:43 UTC
Read the original article
Hit count: 133
ASP.NET
|asp.net-mvc
I'm trying to separate the default AccountModel in mvc2 into a separate interface and repository.
I've created an Interface and Repository and copied over the code from the AccountModel.
I can register users and create accounts but in Visual Studio I'm getting the error below on the AccountController (* below).
Error 1 Inconsistent accessibility: parameter type 'Admin.Models.IMembershipService' is less accessible than method 'Admin.Controllers.AccountController.AccountController(Admin.Models.IMembershipService)
public class AccountController : Controller
{
private IMembershipService MembershipService;
public AccountController() : this(new dao_MembershipService())
{
}
public **AccountController**(IMembershipService repository)
{
MembershipService = repository;
}
Does anyone know how I could fix the error?
© Stack Overflow or respective owner