示例#1
0
 public UserMessage ClearSystemLog(SystemLogClearCommand command)
 {
     EnsureIsValid(command);
     try
     {
         var deleted = _db.LogEntries.Delete(command.ToDbQuery());
         Commit();
         return UserMessage.ResourceFormat(() => Messages.SystemLogClearSuccess, deleted);
     }
     catch (Exception ex)
     {
         throw new ServiceException("Cannot clear system log entries.", ex);
     }
 }
示例#2
0
 public IHttpActionResult Clear(SystemLogClearCommand command)
 {
     var message = _logService.ClearSystemLog(command);
     return Ok(message);
 }