Current database structure is:
Table: fxRates
Fields: createdOn, Value
I also have a List<string> fxLookupList and each string object can correspond to a fxRate value property.
What I am trying to do is get all the fxRates that contain any item with the same Value from List<FxLoopUp> by doing something along the lines of .Where(fx => fxLookUpList.Contains(fx.Value))
However, since fxLookupList has multiple values, I can't figure out how to get all fxRates having the closest previous or matching today's date given that these should contain all values from fxLookupList.
Appreciate the help!
Some explanation (Note that Today, Yesterday, etc are actually DateTime values)
Data Source:
------------------------------
TODAY TEST
YESTERDAY HELLO
YESTERDAY HI
YESTERDAY HELLO
BEFORE YESTERDAY HEY
BEFORE YESTERDAY HI
A WEEK AGO HELLO
A WEEK AGO HEY
Assuming fxLookUpList will have "HELLO" and "HI";
Output =>
YESTERDAY | HELLO
YESTERDAY | HI
Assuming fxLookUpList will have "HEY" and "HI";
Output =>
YESTERDAY | HELLO
BEFORE YESTERDAY | HEY
Assuming fxLookUpList will have "TEST" and "HEY";
Output =>
TODAY | TEST
BEFORE YESTERDAY | HEY