static void FirstLetter() { GringotsContext context = new GringotsContext(); List <string> firstLetters = new List <string>(); foreach (WizzardDeposit wis in context.WizzardDeposits.Where(w => w.DepositGroup == "Troll Chest")) { firstLetters.Add(wis.FirstName.Substring(0, 1)); } foreach (string f in firstLetters.Distinct().OrderBy(x => x)) { Console.WriteLine(f); } }
static void Main(string[] args) { var context = new GringotsContext(); //19 }