get id from list c# code example Example: c# get all id of list object Categories.Select(c => c.Id).ToList();