Beispiel #1
0
        public IActionResult Get(int id)
        {
            if (id <= 0)
            {
                return(BadRequest("Invalid id provided"));
            }

            var emailMessage = emailMessageService.Get(id);

            return(Ok(emailMessage));
        }
Beispiel #2
0
        public IActionResult GetById(int id)
        {
            var emailMessage = _emailService.Get(id);

            if (emailMessage == null)
            {
                return(RespondFailure());
            }
            var model = emailMessage;//.ToModel();

            return(RespondSuccess(model));
        }