protected bool AssertValidContext(string errorId, object target)
        {
            Context = Context ?? MetadataHelpers.GetEntityDriveFromPSPath(this.SessionState.Path, ".");
            if (null != Context)
            {
                return true;
            }

            var exception = new InvalidUnitOfWorkContextException(
                "The context (drive) for the unit of work could not be determined from the current location; please include a valid entity drive path in the -Context parameter"
                );
            var errorRecord = new ErrorRecord(exception,
                                              errorId + ".InvalidEntityContext",
                                              ErrorCategory.InvalidArgument,
                                              target);
            WriteError(errorRecord);
            return false;
        }
        protected bool AssertValidContext(string errorId, object target)
        {
            Context = Context ?? MetadataHelpers.GetEntityDriveFromPSPath(this.SessionState.Path, ".");
            if (null != Context)
            {
                return(true);
            }

            var exception = new InvalidUnitOfWorkContextException(
                "The context (drive) for the unit of work could not be determined from the current location; please include a valid entity drive path in the -Context parameter"
                );
            var errorRecord = new ErrorRecord(exception,
                                              errorId + ".InvalidEntityContext",
                                              ErrorCategory.InvalidArgument,
                                              target);

            WriteError(errorRecord);
            return(false);
        }