private static List<AllegationWithMyComment> MapAllegations(CaseAllegation[] allegations) { var result = new List<AllegationWithMyComment>(); if (allegations != null) { foreach (var allegation in allegations) result.Add(Mappers.MapAllegation(allegation)); } return result; }
private static AllegationWithMyComment MapAllegation(CaseAllegation allegation) { return new AllegationWithMyComment() { Id = allegation.Id, Text = allegation.Text, Documents = Mappers.MapDocuments(allegation.Documents), CanBeDeleted = allegation.CanBeDeleted, Comment = Mappers.MapMyAllegationComment(allegation.MyComment), }; }