I am getting the error on build time, so I can not see the stack trace. The application is working OK for adding new entities, fetching collections, it is an ASP app.
But my problem is for record edition since I can not load it. I have loaded this way befor but I am not sure why I am getting the error.
I am attaching one of the entities that is throwing the error. I am using the 2.5 version of llblgen.
Here is where I get the error:
public void SaveData()
{
SiniestroEntity entidad = new SiniestroEntity();
DataAccessAdapter adapter = new DataAccessAdapter();
// If it is edition we load it from DB
if (!IsNewRecord())
{
entidad.Id = Convert.ToInt32(GetKeyValue());
adapter.FetchEntity(entidad);
}
...
....
}
private bool IsNewRecord()
{
string isNew = Request.QueryString["IsNew"];
return (isNew != null && isNew != "");
}
If i do this:
SiniestroEntity entidad = new SiniestroEntity(id);
I get an overload methos for the EnitityClassConstuctor