public HttpResponseMessage Post([FromBody] CitizenDto citizenDto) { if (!ModelState.IsValid) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, "Missing values")); } _citizenService.Add(citizenDto); return(Request.CreateResponse(HttpStatusCode.OK, "Citizen added in National Population Register")); }
public IActionResult Post([FromBody] Citizen citizen) { _citizenService.Add(citizen); return(Ok()); }