コード例 #1
0
 public async Task <IActionResult> GetChallenges([FromBody] SearchDesafioViewModel model,
                                                 [FromQuery] int skip = 0, [FromQuery] int take = 10)
 {
     return(await this.Post(ModelState, async() =>
     {
         var teacherId = _userService.Get_ProfesorId(User.Claims);
         return await _ctrlService.GetAll_Desafios(teacherId, model, skip, take);
     }));
 }
コード例 #2
0
        public async Task <IActionResult> Index(
            SearchDesafioViewModel searchModel, int skip = 0,
            int take = 10)
        {
            var profId = _userService.Get_ProfesorId(User.Claims);
            var model  = await _ctrlService.GetAll_Desafios(profId,
                                                            searchModel, skip, take);

            return(View(model));
        }