예제 #1
0
 public IActionResult EditHealthInfo([FromBody] HealthInfoDto healthInfoDto)
 {
     if (ModelState.IsValid)
     {
         healthInfoDto.Time = DateTime.Now;
         _healthInfoService.EditHealthInfo(healthInfoDto);
         return(Ok());
     }
     return(BadRequest());
 }
예제 #2
0
 public IActionResult AddHealthInfo([FromBody] HealthInfoDto healthInfoDto)
 {
     if (ModelState.IsValid)
     {
         healthInfoDto.Time = DateTime.Now;
         _healthInfoService.AddHealthInfo(healthInfoDto);
         return(StatusCode(StatusCodes.Status201Created));
     }
     return(BadRequest());
 }
예제 #3
0
 public void EditHealthInfo(HealthInfoDto healthInfo)
 {
     _healthInfoRepository.EditHealthInfo(_mapper.Map <HealthInfoDto, HealthInfo>(healthInfo));
 }