示例#1
0
        public async Task <IActionResult> CollectAsync([FromRoute] string bucket, [FromBody] IEnumerable <RequestAddLog> logRequests)
        {
            logRequests ??= Enumerable.Empty <RequestAddLog>();

            var logs = logRequests.Select(lr => new LogRecord(lr));

            await service.AddLogs(bucket, logs);

            return(NoContent());
        }
        public IActionResult AddLogs()
        {
            bool result = _logService.AddLogs();

            if (result)
            {
                return(Ok("Loglar Veritabanına Başarıyla Eklendi."));
            }
            else
            {
                return(BadRequest("Loglar Veritabanına Eklenemedi."));
            }
        }