Exemplo n.º 1
0
        public void Updade(int BloodCenterId, UpdateBloodCenterDTO updateBloodCenter)
        {
            var BloodCenter = _bloodCenterRepository.GetById(BloodCenterId);

            BloodCenter.Update(updateBloodCenter.Name, updateBloodCenter.Responsible, updateBloodCenter.Address, updateBloodCenter.PhoneNumber);
            _bloodCenterRepository.Update(BloodCenter);
        }
Exemplo n.º 2
0
 public IActionResult Update(int bloodcenterId, [FromBody] UpdateBloodCenterDTO updateBloodCenter)
 {
     try {
         _bloodcenterAppService.Updade(bloodcenterId, updateBloodCenter);
         return(Ok());
     }
     catch (KeyNotFoundException) {
         return(NotFound());
     }
 }