public void Cancel() { var shouldClose = ActiveStaffingResource.EntityFacts.EntityState.IsAdded(); ActiveUnitOfWork.Rollback(); if (shouldClose) { ActiveDetail.TryClose(); } else { ActiveDetail.Start(ActiveStaffingResource.Id, EditMode.View); } }