title: Is it safe in C# to omit await statement when doing an async fire and forget write to a database with ado.net
body: <p>In an asp.net application I want to log to a database as efficiently as possible. I am using basic ADO.NET to write to the logging database and I want to do this async, so here is what I do:</p>
  
  <pre><code>        using (var conn = new SqlConnection(_connectionString)) {
              using (var cmd = new SqlCommand("INSERT INTO dbo.Logs (TimeStamp,ThreadId,Level,Message,Exception) VALUES (@TimeStamp,@ThreadId,@Level,@Message,@Exception)", conn)) {
                  cmd.Parameters.AddWithValue("@TimeStamp", DateTime.UtcNow);
                  cmd.Parameters.AddWithValue("@ThreadId", Thread.CurrentThread.ManagedThreadId);
                  cmd.Parameters.AddWithValue("@Level", level);
                  cmd.Parameters.AddWithValue("@Message", msg);
                  cmd.Parameters.AddWithValue("@Exception", ex == null ? "" : ex.ToString());
                  conn.Open();
                  cmd.ExecuteNonQueryAsync();
              }
          }
  </code></pre>
  
  <p>Now my question is if I should do an await on the cmd.ExecuteNonQueryAsync() statement or if it is ok to omit the await because I basically just need to do a fire-and-forget.</p>