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;
}
}