linq select
Code Example - linq select
IEnumerable<SelectListItem> stores =
from store in database.Stores
where store.CompanyID == curCompany.ID
select new SelectListItem { Value = store.Name, Text = store.ID };
linq query select where csharp
var queryLondonCustomers = from cust in customers
where cust.City == "London"
select cust;