public override ActionResult <TalkDraft> CreateTalkDraft(string communityId, CreateTalkDraftParameters talkDraft) { try { var result = _talkDraftService.CreateTalkDraft(communityId, talkDraft.Id, talkDraft.Title, talkDraft.Description); return(this.GetCreatedActionResult( nameof(CreateTalkDraft), GetCreateTalkDraftRouteValues(communityId), Convert(result))); } catch (CommunityNotFoundException ex) { return(NotFound(Invariant($"Cannot find community {ex.CommunityId}."))); } catch (TalkExistsException ex) { return(Conflict(Invariant($"Talk draft '{ex.TalkId}' is already exists."))); } }
public abstract ActionResult <TalkDraft> CreateTalkDraft([FromRoute][Required] string communityId, [FromBody] CreateTalkDraftParameters talkDraft);
public abstract void CreateTalkDraft([FromBody] CreateTalkDraftParameters talkDraft);