Created
August 22, 2017 19:31
-
-
Save JeremyLikness/6e3dbd74d9575bd8bf4cee85026dba46 to your computer and use it in GitHub Desktop.
Querying tables in Sterling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var combos = db.Query<Combo, int>() | |
| .Where(c => c.LazyValue.Value.Color.Id == colorList[idx].Id) // filter | |
| .Select(c => c.LazyValue.Value); // project to lazy-loaded value | |
| var comboList = combos.Select(c => $"{c.Color.Name} {c.Planet.Name} {c.Cat.Name}"); | |
| foreach(var combo in comboList.OrderBy(c => c)) | |
| { | |
| Console.WriteLine($"Found awesome combo {combo}."); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment