Hi,
Try this,
List<employeeinfo> EList = new List<employeeinfo>();
EList.Add(new EmployeeInfo(1, "a1", "b1"));
EList.Add(new EmployeeInfo(2, "a2", "b2"));
List<employeeinfo> OList = new List<employeeinfo>();
OList.Add(new EmployeeInfo(1, "aa1", "bb1"));
OList.Add(new EmployeeInfo(3, "aa2", "bb2"));
var result = (
from e in EList
select new {
Id = e.ID,
Name = e.Name,
Email = e.Email,
IS_Elist = true,
IS_Olist = false }
).Union(
from o in OList
select new {
Id = o.ID,
Name = o.Name,
Email = o.Email,
IS_Elist = false,
IS_Olist = true }
).ToList();
Here you have to create new list with 5 column and have to put IS_Olist false in first query and IS_Elist false in second query.
I hope this will help.
Thanks :)