Esempio n. 1
0
        public static ChildDto[] GetDto(Child[] children)
        {
            ChildDto[] result = new ChildDto[children.Length];

            for (int i = 0; i < children.Length; i++)
            {
                Child c = children[i];
                result[i] = new ChildDto(c.ID, c.Name, c.Age, c.IdEvent1, c.IdEvent2);
            }

            return(result);
        }
Esempio n. 2
0
 public static Child GetFromDto(ChildDto dto)
 {
     return(new Child(dto.ID, dto.Name, dto.Age, dto.IdEvent1, dto.IdEvent2));
 }