Exemplo n.º 1
0
 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.")));
     }
 }
Exemplo n.º 2
0
 public abstract ActionResult <TalkDraft> CreateTalkDraft([FromRoute][Required] string communityId, [FromBody] CreateTalkDraftParameters talkDraft);
Exemplo n.º 3
0
 public abstract void CreateTalkDraft([FromBody] CreateTalkDraftParameters talkDraft);