protected override void ProcessRecord()
        {
            base.ProcessRecord();

            if (!ConfirmDelete("OCIDatacatalogTerm", "Remove"))
            {
                return;
            }

            DeleteTermRequest request;

            try
            {
                request = new DeleteTermRequest
                {
                    CatalogId    = CatalogId,
                    GlossaryKey  = GlossaryKey,
                    TermKey      = TermKey,
                    IfMatch      = IfMatch,
                    OpcRequestId = OpcRequestId
                };

                response = client.DeleteTerm(request).GetAwaiter().GetResult();
                WriteOutput(response);
                FinishProcessing(response);
            }
            catch (Exception ex)
            {
                TerminatingErrorDuringExecution(ex);
            }
        }
Esempio n. 2
0
        public ActionResult <DeleteTermResponse> Delete([FromBody] DeleteTermRequest request)
        {
            request.CommanderID = User.GetUserId();
            var result = _termService.Delete(request);

            return(result);
        }