[ACCEPTED]-How do you do alias in Select method (LINQ)-linq
Accepted answer
It's called a "Projection", just select 1 a new anonymous type.
var projection = data.Select( x => new { FieldName = x.Property } );
You are looking to select into a new anonymous 1 type.
var providers = EMRRepository.GetProviders().Select(x => new { Name = x });
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.