예제 #1
0
        public ActionResult <UserNotification> GetUserNotification(Guid ID)
        {
            try
            {
                var rs = _userNotificationService.GetByID(ID);
                if (rs == null)
                {
                    return(NotFound("ID not found!"));
                }

                UserNotificationVM result = _mapper.Map <UserNotificationVM>(rs);
                return(Ok(result));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }