Beispiel #1
0
        public VolunteerViewModel Add(VolunteerViewModel volunteerViewModel)
        {
            var volunteer = _mapper.Map <VolunteerViewModel, Volunteer>(volunteerViewModel);

            _volunteerService.Add(volunteer);
            return(volunteerViewModel);
        }
        public VolunteerViewModel Add(VolunteerViewModel volunteerViewModel)
        {
            var volunteer = _mapper.Map <VolunteerViewModel, Volunteer>(volunteerViewModel);

            _uow.BeginTransaction();
            var volunteerReturn = _volunteerService.Add(volunteer);

            _uow.Commit();

            volunteerViewModel = _mapper.Map <Volunteer, VolunteerViewModel>(volunteerReturn);
            return(volunteerViewModel);
        }
Beispiel #3
0
 public Volunteer Add(Volunteer subject)
 {
     return(volunteerService.Add(subject));
 }