private async Task <NationalityWriteResource> AttachUserIdToRecord(NationalityWriteResource record)
        {
            var user = await Identity.GetConnectedUserId(httpContext);

            record.UserId = user.UserId;
            return(record);
        }
 public async Task <IActionResult> PutNationalityAsync([FromBody] NationalityWriteResource record)
 {
     repo.Update(mapper.Map <NationalityWriteResource, Nationality>(await AttachUserIdToRecord(record)));
     return(StatusCode(200, new {
         response = ApiMessages.RecordUpdated()
     }));
 }