using System.Collections.Generic;
public bool hasSomething { get; set; }
public class Registrations {
public int Id { get; set; }
public List<Comment> Comment { get; set; }
public static void Main()
Console.WriteLine("Hello World");
List<Registrations> registrations = new List<Registrations>();
registrations.Add(new Registrations { Id = 1, Comment = new List<Comment> {new Comment { hasSomething = false}}});
registrations.Add(new Registrations { Id = 2, Comment = new List<Comment> {new Comment { hasSomething = false}}});
registrations.Add(new Registrations { Id = 3, Comment = new List<Comment> {new Comment { hasSomething = true}}});
registrations.Add(new Registrations { Id = 4, Comment = new List<Comment> {new Comment { hasSomething = false}}});
registrations.Add(new Registrations { Id = 5, Comment = new List<Comment> {new Comment { hasSomething = true}}});
registrations.Add(new Registrations { Id = 6, Comment = new List<Comment> {new Comment { hasSomething = false}}});
registrations = registrations.OrderByDescending(x => x.Comment.Any(p => p.hasSomething == true)).ToList();
foreach(var registration in registrations) {
Console.WriteLine(registration.Id);