public async Task <IActionResult> PutShipAsync([FromBody] ShipWriteResource record) { var response = repo.IsValid(record); if (response == 200) { repo.Update(mapper.Map <ShipWriteResource, Ship>(await AttachUserIdToRecord(record))); return(StatusCode(200, new { response = ApiMessages.RecordUpdated() })); } else { return(GetErrorMessage(response)); } }