public Muscle AddMuscle(NewMuscle newMuscle) { var muscleEntity = _mapper.Map<Data.Entities.Muscle>(newMuscle); _muscleRepository.Add(muscleEntity); _unityOfWork.Save(); var muscle = _mapper.Map<Muscle>(muscleEntity); return muscle; }
public IHttpActionResult AddMuscle(HttpRequestMessage request, NewMuscle newMuscle) { return new MuscleCreatedActionResult(request, _addMuscleMaintenanceProcessor.AddMuscle(newMuscle)); }