I have a working website (designed in MVC), along with a database on the host site, that I'm connected to via a connection string provided by the host.
The site was working probably ; yet I needed to update the code, and with it update the only model I have : which contains representations of 3 tables (my modification yet to make it represent four).
I only add classes, with the physical table's name (without the extra s).
I migrated a new table to the server, but whenever I define a new model to represent that table, all my views and controllers, which contain model initialization simply don't work and redirect me to a small error page I made.
Could somebody guide me to what the problem might be ?
public class xModel
{
public class a
{
public int Id { get; set; }
public string Title { get; set; }
public string Desc { get; set; }
public string source { get; set; }
}
public class b
{
public int Id { get; set; }
public string name { get; set; }
}
public class c
{
public int Id { get; set; }
public string name { get; set; }
public string des { get; set; }
public string author { get; set; }
}
public class d
{
public int Id { get; set; }
public string Country { get; set; }
public string Street { get; set; }
public double x { get; set; }
public double y { get; set; }
}
}
public class DatabaseConnection : DbContext
{
public DbSet<xmodel.a> a { get; set; }
public DbSet<xmodel.b> b { get; set; }
public DbSet<xmodel.c> c { get; set; }
public DbSet<xmodel.d> d { get; set; }