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())
开发者_如何学C{
}
public **AccountController**(IMembershipService repository)
{
MembershipService = repository;
}
Does anyone know how I could fix the error?
You need to make your IMembershipService interface public.
精彩评论