Linq and Lambda syntax
var jsonData = from user in users
select new[] { user.Id.ToString(),
user.Person.Lastname,
user.Person.Firstname };
Alternatively, you can use the lambda syntax:
var jsonData = users.Select(user => new[] { user.Id.ToString(),
user.Person.Lastname,
user.Person.Firstname });
Comments