public async Task <IActionResult> Logger([FromBody] LoggerDTOs loggerDTOs) { if (!ModelState.IsValid) { return(BadRequest()); } await _loggerService.InsertIntoLog(loggerDTOs); return(Ok()); }
public async Task <bool> InsertIntoLog(LoggerDTOs loggerDTOs) { var createLog = new Logger { Exception = loggerDTOs.Exception, Message = loggerDTOs.Message, Level = loggerDTOs.Level, Date = loggerDTOs.Date }; await _loggerRepository.InsertIntoLog(createLog); return(true); }