Castle.MonoRail.ActiveRecordScaffold.ConfirmRemoveAction.PerformActionProcess C# (CSharp) Method

PerformActionProcess() protected method

protected PerformActionProcess ( Controller controller ) : void
controller Castle.MonoRail.Framework.Controller
return void
		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);
			}
		}