Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

C# select keyword lambda

IEnumerable<SelectListItem> stores = database.Stores
        .Where(store => store.CompanyID == curCompany.ID)
        .Select(store => new SelectListItem { Value = store.Name, Text = store.ID });

 ViewBag.storeSelector = stores;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #select #keyword #lambda
ADD COMMENT
Topic
Name
5+8 =