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