Esempio n. 1
0
        public ApiResponse <List <ExamItem> > FindList(FindListRequest request)
        {
            var model = ExamItemService.GetEntitiesByIds(request.Ids);

            var result = new ApiResponse <List <ExamItem> >()
            {
                Result = model
            };

            if (model != null)
            {
                result.Success();
            }
            else
            {
                result.Failed(ResultEnum.NoData);
            }

            return(result);
        }
Esempio n. 2
0
        public ApiResponse <ExamItem> Find(int id)
        {
            var model = ExamItemService.GetEntityById(id);

            var result = new ApiResponse <ExamItem>()
            {
                Result = model
            };

            if (model != null)
            {
                result.Success();
            }
            else
            {
                result.Failed(ResultEnum.NoData);
            }

            return(result);
        }