Beispiel #1
0
        public async Task <IHttpActionResult> PostMessage(Message message)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            await MessagingService.AddMessage(message);

            return(CreatedAtRoute("DefaultApi", new { id = message.Id }, message));
        }