public ActionResult <RClientOutput> PostClient([FromBody] RClientInput client) { try { if (client == null) { throw new RestException("Er moet een client zijn om te posten"); } int id = manager.AddClient(Mapper.ToClient(client)); return(CreatedAtAction(nameof(GetClient), new { id }, Mapper.ToRClientOutput(manager.GetClient(id)))); } catch (Exception ex) { return(BadRequest(ex.Message)); } }