I have a Microsoft Access Database (.accdb) full of values that I wish to display in a table on my .cshtml razor page. I need to open the connection and then make the table with the values.
I think that the table would be something like this:
<table>
<thead>
<tr>
<th>Name</th>
<th>Address</th>
<th>Address 2</th>
<th>Field of Work</th>
</tr>
</thead>
<tbody>
@foreach (var row in _____.Query(____))
{
<tr>
<td>@row.name</td>
<td>@row.address</td>
<td>@row.address2</td>
<td>@row.field</td>
</tr>
}
</tbody>
</table>
, but I have not been able to open the connection correctly.
Advice please?