Beispiel #1
0
        public IActionResult Post([FromBody] EmailMessageModel model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var response = emailMessageService.Add(model);

            if (!response.Success)
            {
                return(BadRequest(response.Message));
            }
            return(Ok(response.ReturnedId));
        }