Make sure the controller has a parameterless public constructor

1

I'm getting this error after giving deploy(AWS) of my WebApi .

LOCATION WORKS PERFECTLY .

  

<ExceptionMessage> An error occurred when trying to create a controller of type 'LivroController'. Make sure that the controller has a parameterless public constructor. </ExceptionMessage>

My controller :

public class LivroController : BaseODataController<Livro>
{
  public LivroController() : base()
    {}
}

My Base OdataController :

public class BaseODataController<TEntity> : ODataController, 
IBaseController<TEntity> where TEntity : class
{
    private readonly IRepositoryBase<TEntity> Repository;

    public BaseODataController()
    {
        Repository = new RepositoryBase<TEntity>();
    }

    [EnableQuery]
    public IList<TEntity> Get()
    {
        return Repository.Get().ToList();
    }
}

I've already put an empty constructor in LivroController , but it still has the error .

Full Error Image:

    
asked by anonymous 23.03.2018 / 20:52

0 answers