Esempio n. 1
0
        public async Task UpdateConfigAsync(AlertConfig data)
        {
            AlertConfig origConfig = Auditing.Active ? await GetItemAsync() : null;

            data.Id = KEY;
            UpdateStatusEnum status = await DataProvider.UpdateAsync(data.Id, data.Id, data);

            if (status != UpdateStatusEnum.OK)
            {
                throw new InternalError("Unexpected error saving configuration {0}", status);
            }
            await Auditing.AddAuditAsync($"{nameof(AlertConfigDataProvider)}.{nameof(UpdateConfigAsync)}", "Config", Guid.Empty,
                                         "Update Alert Config",
                                         DataBefore : origConfig,
                                         DataAfter : data,
                                         ExpensiveMultiInstance : true
                                         );
        }