예제 #1
0
        public async Task <ActionResult <PermissionTypeDto> > GetById(int id)
        {
            var permissionType = await _service.GetById(id);

            if (permissionType == null)
            {
                return(NotFound());
            }
            var permissionTypeDto = _mapper.Map <PermissionType, PermissionTypeDto>(permissionType);

            return(Ok(permissionTypeDto));
        }
        public ActionResult PermissionTypeGetById(int id)
        {
            var result = _permissionTypeService.GetById(id).Data;

            return(View("PermissionTypeGetById", result));
        }