I am trying to send Oracle data from my controller to my view. I understand that the data can be added from the OracleDataReader to a DataTable like so:
OracleDataReader dr = cmd.ExecuteReader();
if (dr.HasRows)
{
dataTable.Load(dr);
}
Then my view needs to reference a model but I am not sure which. This is what I have tried:
@model System.Data.DataSet
...
@foreach (DataRow row in Model.Tables)
{
}
It doesn't compile, and I am unsure if I am using the correct model, or just incorrect syntax.
Also, I would be interested if this is the most efficient way to write this (should I be using a model? Is there a better option than using DataTable?)