public IActionResult Delete(int id)
 {
     try
     {
         return(Ok(DocumentManipulation.DeleteDocument(id)));
     }
     catch (Exception ex)
     {
         Logger.LogError(ex.Message);
         throw new NSIException(ex.Message, DC.Exceptions.Enums.Level.Error, DC.Exceptions.Enums.ErrorType.InvalidParameter);
     }
 }
示例#2
0
文件: DocumentTests.cs 项目: adkl/nsi
        public void DeleteDocument_Success()
        {
            bool isDeleted = _documentManipulation.DeleteDocument(1);

            Assert.AreEqual(true, isDeleted);
        }