How to populate a drop-down list from a SQL table in C# : <p>I have a table in my SQL database, and using MVC on a ASP.NET Core:</p>

<pre><code>CREATE TABLE [dbo].[ProgramVersion] (
    [ID]       INT          IDENTITY (1, 1) NOT NULL,
    [Ver]      VARCHAR (10) NOT NULL,
    [Released] DATETIME     NOT NULL
);
</code></pre>

<p>Very simple. I have a scaffolded Edit.cshtml file, has a form for editing a records from a different table. I just want to use the records in the ProgramVersion table to populate an HTML select input (i.e. drop down list).</p>

<ol>
<li>How do I execute a simple query that gives me a result-set?</li>
<li>How do I iterate through the result-set and simply put the 'Ver' string value into the Options tags in the drop-down list?</li>
</ol>

<p>(In PHP, this is dead simple, but C# is really frustrating me.)</p>
