シングルスレッドアプリケーションでは、以下のパターンを使用してSqlCommandsを作成することがよくあります。
現在、Webサービスを作成していますが、このパターンが複数のクライアントからの要求を同時に処理することに耐えられないのではないかと心配しています。
関数をロックして単一のクライアントのみを一度に実行できるようにする以外に、複数のクライアントに対して単一の「準備された」SqlCommandを使用する方法はありますか?
    private static SqlCommand cmdInsertRecord;
    public static void InsertRecord(String parameter1, String parameter2, SqlConnection connection, SqlTransaction transaction)
    {
        if (cmdInsertRecord == null)
        {
            //Create command
            cmdInsertRecord = connection.CreateCommand();
            cmdInsertRecord.CommandText = @"SQL QUERY";
            //Add parameters to command
            cmdInsertRecord.Parameters.Add("@Parameter1", SqlDbType.Int);
            cmdInsertRecord.Parameters.Add("@Parameter2", SqlDbType.DateTime);
            //Prepare the command for use
            cmdInsertRecord.Prepare();
        }
        cmdInsertRecord.Transaction = transaction;
        //Note SetParameter is an extension that handles null -> DBNull.
        cmdInsertRecord.SetParameter("@Parameter1", parameter1);
        cmdInsertRecord.SetParameter("@Parameter2", parameter2);
        cmdInsertRecord.ExecuteNonQuery();
    }