how can get data from another Table
Posted
by
Pushpendra Kuntal
on Stack Overflow
See other posts from Stack Overflow
or by Pushpendra Kuntal
Published on 2011-06-20T07:46:54Z
Indexed on
2011/06/20
16:23 UTC
Read the original article
Hit count: 285
I am designing a project in asp.net mvc3, i have designed my database in sql server, add i am using ado.net.
This is my controller action
public ViewResult ProductFormulationIndex()
{
return View(db.ProductFormulation.ToList());
}
means i want to display all fields of ProductFormulation table. this is my table:-
and this is my productCategory Table
in my ProductFormulationIndex.cshtml i want to display Code of ProductCategory Table, not only id. So what should i do in controller or in Model for it ? you may suggest tutorial related to it. Thanks in advance.
© Stack Overflow or respective owner