public void IdGet_WhenFailed_ReturnsNoContent() { _service.Deletar(_testLog.EventID); EventLog temp = _context.EventLogs.Where(x => x.EventID == _testLog.EventID).FirstOrDefault(); if (temp != null) { throw new Exception("ERROR: file still present after deletion. Please contact support."); } }
public ActionResult <string> Delete(int id) { var deletereturn = _eventLogService.Deletar(id); if (deletereturn) { return(Ok("Deleted Successfully")); } else { return(NoContent()); } }