I create model from my sql 2008 server database using northwind example.
Model.Order, I want to dynamically use the Order rows, just like datatable
DataTable a = New DataTable() .
.......fill the order data to table a .and then I can use
a[1]
or a["orderid"]
to get the data .
but in mvc
Ican just use Model.Order a = new Model.Order()
...fill the a with data .
use a.OrderID
to get the data
Is there any way to foreach it with count like
for(int i=0;i<a.count;i++)
{
//how to get the data like these way ??
}