Below is the code, Ihave written and it just returns only the first record, because of the FirstOrDefault. What should be my syntax to get all the Email address stored in the variable EmailAddresses, where the FlagActive field is True.
IList<string> EmailAddresses = new List<String>();
EmailAddresses.Add(Context.FOCALPOINTs.FirstOrDefault(T => T.FlagActive == true).Email.ToString());
foreach (string emailAddress in EmailAddresses)
tempEmail = tempEmail + ";" + emailAddress;
I think you want something like this:
As a slight side note, the part you have here:
the == true here is unnecessary, as T.FlagActive is already a boolean.