public async Task <IActionResult> PostContact(ContactCreateRequest contactCreateRequest) { if (!ModelState.IsValid) { return(StatusCode(400)); } var identityClaimNum = int.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value); var dto = _mapper.Map <ContactCreateDTO>(contactCreateRequest); dto.OwnerId = identityClaimNum; if (await _contactCreateManager.ContactCreate(dto)) { return(StatusCode(201)); //TODO: Return URL of new resource } return(StatusCode(500)); }