This line:
return View("Index");
is not passing a model to the Index view.
You need to create an instance of your view, and set its properties:
var model = new IndexModel();
...
else //if id is valid
{
var tech = _oTechFacade.getTechnicians(id, _oAppSetting.ConnectionString)[0]; //data from the database
string fNameStr = tech.GetType().GetProperty("FIRSTNAME").GetValue(tech, null).ToString();
string lNameStr = tech.GetType().GetProperty("LASTNAME").GetValue(tech, null).ToString();
//When the the ID is found, we populate our model
//so it can be displayed
model.firstname = fNameStr;
model.lastname = lNameStr;
}
Now you can do:
return View("Index", model);