Exemple #1
0
        public ActionResult <Reason> Get(Guid id)
        {
            var reason = _reasonService.GetReasonById(id);

            if (reason == null)
            {
                return(NotFound(new ErrorData(StatusCodes.Status404NotFound, "Not found", null)));
            }
            var result = _mapper.Map <Reason>(reason);

            return(Ok(result));
        }
Exemple #2
0
        public ReasonDto GetReasonById(int MstReasonId)
        {
            var data = _ReasonBLL.GetReasonById(MstReasonId);
            var redata = Mapper.Map<ReasonDto>(data);

            return redata;
        }