コード例 #1
0
        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;
        }
コード例 #2
0
 public IHttpActionResult AddMuscle(HttpRequestMessage request, NewMuscle newMuscle)
 {
     return new MuscleCreatedActionResult(request, _addMuscleMaintenanceProcessor.AddMuscle(newMuscle));
 }