public async Task <IHttpActionResult> GetNewParticipant(ChatParticipantDto participant) { try { if (ModelState.IsValid) { return(Ok(await _chatManager.CreateParticipant(participant))); } else { return(BadRequest(ModelState)); } } catch (Exception ex) { return(InternalServerError(ex)); } }