Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/SqlAsyncCollector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ private async Task UpsertRowsAsync(IEnumerable<T> rows, SqlAttribute attribute,
var upsertRowsAsyncSw = Stopwatch.StartNew();
using (SqlConnection connection = SqlBindingUtilities.BuildConnection(attribute.ConnectionStringSetting, configuration))
{
this._logger.LogDebugWithThreadId("BEGIN OpenUpsertRowsAsyncConnection");
await connection.OpenAsync();
this._logger.LogDebugWithThreadId("END OpenUpsertRowsAsyncConnection");
Dictionary<TelemetryPropertyName, string> props = connection.AsConnectionProps();

string fullTableName = attribute.CommandText;
Expand Down Expand Up @@ -403,7 +405,7 @@ public TableInformation(IEnumerable<PropertyInfo> primaryKeys, IDictionary<strin
this.HasIdentityColumnPrimaryKeys = hasIdentityColumnPrimaryKeys;

// Convert datetime strings to ISO 8061 format to avoid potential errors on the server when converting into a datetime. This
// is the only format that are an international standard.
// is the only format that are an international standard.
// https://docs.microsoft.com/previous-versions/sql/sql-server-2008-r2/ms180878(v=sql.105)
this.JsonSerializerSettings = new JsonSerializerSettings
{
Expand Down
2 changes: 2 additions & 0 deletions src/SqlConverters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ public virtual async Task<string> BuildItemFromAttributeAsync(SqlAttribute attri
using (SqlCommand command = SqlBindingUtilities.BuildCommand(attribute, connection))
{
adapter.SelectCommand = command;
this._logger.LogDebugWithThreadId("BEGIN OpenBuildItemFromAttributeAsyncConnection");
await connection.OpenAsync();
this._logger.LogDebugWithThreadId("END OpenBuildItemFromAttributeAsyncConnection");
Dictionary<TelemetryPropertyName, string> props = connection.AsConnectionProps();
TelemetryInstance.TrackConvert(type, props);
var dataTable = new DataTable();
Expand Down