Accessibility inconsistent: parameter type "value" is less accessible than the "value" method

0
  

Inconsistent accessibility: parameter type "IClientManager" is less accessible than the "ClientController.ClientController (IclientManager, UserManager)" method

Controller:

public class ClientController : Controller
{
    private readonly IClientManager _clientManager;
    private readonly UserManager<ApplicationUser> _userManager;

    public ClientController(   <-  Erro está aqui
        IClientManager clientManager,
        UserManager<ApplicationUser> userManager)
    {
        _clientManager = clientManager;
        _userManager = userManager;
    }
}

IClientManager:

internal interface IClientManager : IDisposable
{
    Task<ApplicationClient> CreateClientAsync(ApplicationClient client);
}

Startup:

services.AddScoped<IClientManager, ClientManager>();

ClientManager:

public class ClientManager : IClientManager
{
    private ApplicationDbContext _context;

    public ClientManager(ApplicationDbContext context)
    {
        _context = context;
    }

    public async Task<ApplicationClient> CreateClientAsync(ApplicationClient client)
    {
        var result = await _context.Clientes.AddAsync(client);

        if (result.State == EntityState.Added)
        {
            _context.SaveChanges();
        }

        return result.Entity;
    }
}
    
asked by anonymous 18.09.2018 / 18:47

1 answer

0

Declare the interface as public :

public interface IClientManager : IDisposable

So it stays at the same accessibility level as the "ClientController" class, which is public

    
18.09.2018 / 19:00