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); } }
public IHttpActionResult Clear(SystemLogClearCommand command) { var message = _logService.ClearSystemLog(command); return Ok(message); }