Exemple #1
0
        public IActionResult Post([FromBody] string idNumber)
        {
            Response response = null;

            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            if (!string.IsNullOrEmpty(idNumber))
            {
                response = coreService.AddResident(idNumber);
            }
            return(Ok(response));
        }
 public IActionResult AddResident([FromBody] AddResidentDto residentDto)
 {
     _residentService.AddResident(residentDto);
     return(Json(JsonResultData.Success()));
 }