Exemple #1
0
 public async Task StartAsync()
 {
     foreach (var table in configuration.Tables)
     {
         var generator = new TableContentGenerator(table, log);
         await generator.StartAsync();
     }
 }
        private async Task <string> CreateRecord()
        {
            await log.WriteLineAsync($"Creating new record for table {dependency.DependentTable.Name}");

            var tableContentGenerator = new TableContentGenerator(dependency.DependentTable, log);
            var generatedId           = (await tableContentGenerator.StartAsync()).FirstOrDefault();

            if (generatedId == Guid.Empty)
            {
                var message = $"Requested row wasn't generated for table '{dependency.DependentTable.Name}' (identity: '{dependency.DependentTable.IdentityField}').";
                await log.WriteLineAsync(message);

                throw new NotGeneratedException(message);
            }

            return(generatedId.ToTableRecordValueString());
        }