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); }
public Volunteer Add(Volunteer subject) { return(volunteerService.Add(subject)); }