예제 #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);
     }));
 }