public async Task <IActionResult> Create(MessageCreate messageCreate) { var user = await _userManager.GetUserAsync(User); messageCreate.UserID = user.Id; await _createMessage.Execute(messageCreate); return(Ok()); }
public HttpResponseMessage CreateMessageOnTopic(Identity id, HttpRequestMessage request) { return(ProcessPost(() => { var message = Create(request); message.TopicId = id; createMessageCommand.Execute(message); return ResourceLocation.OfMessageByTopic(message); })); }