Beispiel #1
0
        private async Task <GenderWriteResource> AttachUserIdToRecord(GenderWriteResource record)
        {
            var user = await Identity.GetConnectedUserId(httpContext);

            record.UserId = user.UserId;
            return(record);
        }
Beispiel #2
0
 public async Task <IActionResult> PutGenderAsync([FromBody] GenderWriteResource record)
 {
     repo.Update(mapper.Map <GenderWriteResource, Gender>(await AttachUserIdToRecord(record)));
     return(StatusCode(200, new {
         response = ApiMessages.RecordUpdated()
     }));
 }