コード例 #1
0
        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.");
            }
        }
コード例 #2
0
        public ActionResult <string> Delete(int id)
        {
            var deletereturn = _eventLogService.Deletar(id);

            if (deletereturn)
            {
                return(Ok("Deleted Successfully"));
            }
            else
            {
                return(NoContent());
            }
        }