I saw posts like below which are really hard for me to understand. So I am re-posting it. Sorry if someone feels it's duplicate. I have just simple requirements
C# Joins/Where with Linq and Lambda
I have a class like this
public class Person
{
public int Id{get;set;}
public string Name{get;set;}
public string MailingAddress{get;set;}
}
I have a method like below
public IList<Person> GetNames(IList<int> ids)
This will give me List of persons like below
1 "Sam" ""
2 "Dev" ""
4 "Hummy"
I have another method like below
public IList<Person> GetMailingAddress(IList<int> ids)
This will give me List of persons like below
1 "" "ABC"
6 "" "TTT"
2 "" "XYZ"
Now I need to merge results of two methods so that I can have my final result like this
1 "Sam" "ABC"
2 "Dev" "XYZ"
UPDATE : I am sorry I didnot clearly give my test data. Please see above my test data