public IHttpActionResult CreateMessageAsync([FromBody] Message message) { //FileLogger.Instance.Log("api/message HttpPost request", DataFormatUtil.GetFormatedLongDateTimeString(DateTime.Now)); Message result = MessageDB.CreateMessage(message); if ((result) == null) { return(BadRequest()); } return(Ok(result)); }