protected override void PerformActionProcess(Controller controller)
{
base.PerformActionProcess(controller);
object idVal = CommonOperationUtils.ReadPkFromParams(controller, ObtainPKProperty());
try
{
if (!controller.Flash.Contains(Model.Type.Name))
{
object instance = ActiveRecordMediator.FindByPrimaryKey(Model.Type, idVal, true);
controller.PropertyBag["instance"] = instance;
controller.PropertyBag[Model.Type.Name] = instance;
}
controller.PropertyBag["prefix"] = Model.Type.Name;
controller.PropertyBag["id"] = idVal;
}
catch(Exception ex)
{
throw new ScaffoldException("Could not obtain instance by using this id", ex);
}
}