Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class IdRetriever {
- private IEnumerable<Person> people;
- public IdRetriever(IEnumerable<Person> people){
- this.people = people;
- }
- public IEnumerable<int> GetIds(){
- return GetTheIds()
- .Select(x=>(int)x.Id);
- }
- private IEnumerable<dynamic> GetTheIds(){
- return people.Select(x=>new {Id = x.Id});
- }
- }
Add Comment
Please, Sign In to add comment