Esempio n. 1
0
 public groupVolunteeryDTO groupVolunteeryDTO(groupVolunteery groupVolunteery)
 {
     return(new groupVolunteeryDTO
     {
         id = groupVolunteery.id,
         managerId = groupVolunteery.managerId,
         nameGroup = groupVolunteery.nameGroup,
         sum_hour_in_night = groupVolunteery.sum_hour_in_night,
         sum_hour_volunteering_for_week = groupVolunteery.sum_hour_volunteering_for_week
     });
 }
Esempio n. 2
0
        public static groupVolunteeryDTO AddNewGroup(groupVolunteeryDTO groupVolunteeryDTO)
        {
            groupVolunteery groupVolunteer = groupVolunteeryConvertercs.groupVolunteery(groupVolunteeryDTO);

            DB.groupVolunteeries.Add(groupVolunteer);
            if (DB.SaveChanges() > 0)
            {
                return(groupVolunteeryConvertercs.groupVolunteeryDTO(groupVolunteer));
            }
            return(null);
        }