public Result AsResult() { return(new Result { Persons = Persons.OrderBy(p => p.Id).ToList(), ChildRelations = ChildRelations, SpouseRelations = SpouseRelations, SiblingRelations = SiblingRelations, Errors = new HashSet <string>(Errors.OrderBy(e => e)), Warnings = new HashSet <string>(Warnings.OrderBy(e => e)) }); }