Exemple #1
0
 public groupVolunteery groupVolunteery(groupVolunteeryDTO groupVolunteeryDTO)
 {
     return(new groupVolunteery
     {
         id = groupVolunteeryDTO.id,
         managerId = groupVolunteeryDTO.managerId,
         nameGroup = groupVolunteeryDTO.nameGroup,
         sum_hour_in_night = groupVolunteeryDTO.sum_hour_in_night,
         sum_hour_volunteering_for_week = groupVolunteeryDTO.sum_hour_volunteering_for_week,
     });
 }
Exemple #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);
        }