예제 #1
0
        //[SecuredOperation("Sudo,Screens.List,Screens.All", Priority = 1)]
        public async Task <List <ScreenForReturnDto> > GetListAsync()
        {
            var spec          = new ScreenWithSubScreenSpecification();
            var getScreenList = await screenDal.ListEntityWithSpecAsync(spec);

            if (getScreenList == null)
            {
                throw new RestException(HttpStatusCode.BadRequest, new { NotFound = Messages.NotFound });
            }

            var screenForReturn = mapper.Map <List <Screen>, List <ScreenForReturnDto> >(getScreenList);

            return(screenForReturn);
        }