ASP.NET MVC system does not bring newly registered data, only the oldest data on the production server

0

I have a system developed in ASP.NET MVC that has a registry of authors. The system works normally on my machine but when I upload it to the production environment it only brings back only the oldest records in the data list.

The data recently only appear 2 days later.

Note: Detail is that both my machine and the server point to the same database.

Code

public string listarAutores(int id) {
 string json;
 try {
  using(var conexao = new BibliotecaEntities()) {
   var autores = new List < Autor > ();

   var AutoresEditora = conexao.tbEditoraAutor.Where(x => x.IdEditora == id).OrderBy(x => x.tbAutor.Nome).ToList();


   for (int i = 0; i < AutoresEditora.Count(); i++) {
    if (AutoresEditora[i].IdVeiculo == id) {
     var autor = new Autor();

     autor.IdAutor = AutoresEditora[i].IdAutor;
     autor.DsNome = AutoresEditora[i].tbAutor.Nome;


     autores.Add(autor);


    }
   }


   json = JsonConvert.SerializeObject(autores);
   return json;
  }
 } catch (Exception ex) {
  return "";
 }
}
    
asked by anonymous 02.10.2017 / 15:05

0 answers