コード例 #1
0
        public async Task <IActionResult> Create(MessageCreate messageCreate)
        {
            var user = await _userManager.GetUserAsync(User);

            messageCreate.UserID = user.Id;
            await _createMessage.Execute(messageCreate);

            return(Ok());
        }
コード例 #2
0
 public HttpResponseMessage CreateMessageOnTopic(Identity id, HttpRequestMessage request)
 {
     return(ProcessPost(() =>
     {
         var message = Create(request);
         message.TopicId = id;
         createMessageCommand.Execute(message);
         return ResourceLocation.OfMessageByTopic(message);
     }));
 }