public async Task Insert <T>(string table, IList <T> source)
        {
            try
            {
                if (!source.Any())
                {
                    return;
                }

                if (_cancellationToken.IsCancellationRequested)
                {
                    return;
                }

                _sqlBulkCopy.ColumnMappings.Clear();
                using (ObjectReader reader = ObjectReader.Create(source))
                {
                    _sqlBulkCopy.DestinationTableName = table;
                    DataTable schema = reader.GetSchemaTable();
                    if (schema == null)
                    {
                        return;
                    }

                    for (int i = 0; i < schema.Rows.Count; i++)
                    {
                        _sqlBulkCopy.ColumnMappings.Add(schema.Rows[i].ItemArray[1].ToString(), schema.Rows[i].ItemArray[1].ToString());
                    }

                    await _sqlBulkCopy.WriteToServerAsync(reader, _cancellationToken);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(table);
                Console.Write(ex);
                throw;
            }
        }