C#,MVC,oracle大神帮忙啊!本人初学者,所写的程序页面无法显示,麻烦大神看看哪里不对,谢谢!

namespace Web7.Models
{
public class C_F_BuyCert
{
public string C_Id
{ get; set; }
public string Buy_Id
{ get; set; }
public string Spy_Id
{ get; set; }
}
}

namespace Web7.Controllers
{
public class C_F_BuyCertController : Controller
{
public DataTable Index()
{
string ConnectString = "data source=172.16.60.144/orcl;User Id=yzd4hub;Password=yzd4hub;";
OracleConnection conn = new OracleConnection(ConnectString);
try
{
conn.Open();
string sql = "select * from c_f_buycert";
OracleCommand cmd = new OracleCommand(sql, conn);
OracleDataAdapter oda = new OracleDataAdapter(cmd);
DataTable ds = new DataTable();
oda.Fill(ds);
conn.Close();
cmd.Dispose();
return ds;
}
finally
{
conn.Close();
}
}
}
}

@model IEnumerable
@{
ViewBag.Title = "Index";
}

Index

@foreach (var item in Model) { }
C_IdBuy_IdSpy_Id
@Html.DisplayFor(modelItem => item.C_Id)@Html.DisplayFor(modelItem => item.Buy_Id)@Html.DisplayFor(modelItem => item.Spy_Id)

 return ds;
不能这么写
你应该
List<页面绑定的Model> model = new List<页面绑定的Model>();
foreach (var row in ds.Tables[0].Rows)
{
model.Add(new 页面绑定的Model() { C_id = row["C_id字段名"], Buy_Id = row["字段名"], ...  });
}
return View(model);