Showing posts from May, 2018

Working With Linq

Finding the List of entries from DetailsList that are present in MasterList

Lookup Values from MasterList into DetailsList and get the common entries.
result = result.Where(r => r.DetailsList.Any(DetailsList => info.MasterList.Contains(DetailsList)));
Finding the Intersection of two Lists Using Linq. Here

return FirstList.SelectMany(report => report.SecondList).Where(SecondList => SecondList.ReportFilterType == ReportFilterType);

Cohesion vs Coupling

Cohesion means that the pieces stick together. Coupling means that the pieces are stuck together.


Find the files changed between two committs

When we want to know all the changes that happened between two commits, or from date A to Date B. We can get the details by querying the git repository through Terminal.

Here is the command for finding all the files changed between two commits.

git diff --stat <Commit ID 1> <Commit ID 2> Commit ID 1 is start check in. Commit ID 2 is end check in.
The results will show all the files changed between these two commits.