I have two different entities,
class Department
{
int DepID;
string DepName;
}
class Emp
{
int Empid;
string Empname;
int Empage;
int EmpDep; //id of department
}
and I am getting the list of Emp with DepName using the join in Linq, and I want to directly assign this values to datagrid.
So my question is how to get the data converted into list and what will be the object type of this list.
Thanks
Something like
where I use a type
EmpViewto bind to the grid. (This way, you can make a method that produces EmpViews and another method – or component – that does the databinding, separation of concerns).