Пример #1
0
        public static async Task Run([EventGridTrigger] JObject eventGridEventJobject, ILogger log)
        {
            log.LogInformation($"EventGridTrigger triggered at: {DateTime.UtcNow}");

            string encodedJSonString = await GeneralHelpers.ParseEventGridTelemetryBody(eventGridEventJobject);

            if (!string.IsNullOrEmpty(encodedJSonString))
            {
                string jsonString = await GeneralHelpers.Base64Decode(encodedJSonString);

                DataTableEntity mappedWeatherEntity = await MapPayloadToTableEntityAsync(jsonString);
                await SaveDataToStorageTableAsync(mappedWeatherEntity, log);
            }
        }