Converting PHP code to C#
<p>I have the following PHP code which performs an SQL select. I want to translate it into asp.net/C#. </p>

<pre><code>$serverName = 'localhost'; //serverName\instanceName
$connectionInfo = array( 'Database'=&gt;'uwa', 'UID'=&gt;'aston', 'PWD'=&gt;'Aston114');
$conn = sqlsrv_connect( $serverName, $connectionInfo);

if($conn) {
     echo "Connection established.\n";
} else {
     echo 'Connection could not be established.&lt;br /&gt;';
     die( print_r( sqlsrv_errors(), true));
}

function performSelect($sql, $indexed=FALSE) {
    global $conn;
    $result = sqlsrv_query($conn, $sql);
    $allData = array();
    $standardFields = array(
                       'FY2013-2014' =&gt; '$0',
                       'FY2014-2015' =&gt; '$0',
                       'FY2015-2016' =&gt; '$0',
                       'FY2016-2017' =&gt; '$0',
                       'FY2017-2018' =&gt; '$0',
                       'FY2018-2019' =&gt; '$0',
                       'FY2019-2020' =&gt; '$0',
                       'FY2020-2021' =&gt; '$0',
                       'FY2021-2022' =&gt; '$0',
                       'FY2022-2023' =&gt; '$0',
                       'FY2023-2024' =&gt; '$0',
                       'FY2024-2025' =&gt; '$0',
                       'FY2025-2026' =&gt; '$0',
                       'FY2026-2027' =&gt; '$0',
                       'FY2027-2028' =&gt; '$0',
                       'FY2028-2029' =&gt; '$0',
                       'FY2029-2030' =&gt; '$0',
                       'FY2030-2031' =&gt; '$0',
                       'FY2031-2032' =&gt; '$0',
                       'FY2032-2033' =&gt; '$0',
                      );

    while (FALSE !== ($row = sqlsrv_fetch_array($result, SQLSRV_FETCH_ASSOC))) {
        if ($indexed === TRUE &amp;&amp; is_array($row)) {
            unset($row['RowVersion']);
            $allData[$row['AssemblyAssessmentID']] = array_merge($row, $standardFields);
        } else {
            $allData[] = $row;
        }
    }

    return $allData;
}
</code></pre>

<p>What is this code doing? And what is the alternative in asp.net?</p>
