public async Task <IActionResult> GetvideosList([FromBody] MasterVideosRequest request) { JsonResponse <IEnumerable <Application.Dtos.MasterVideos> > objResult = new JsonResponse <IEnumerable <Application.Dtos.MasterVideos> >(); try { IEnumerable <Application.Dtos.MasterVideos> list = await this._superAdminService.GetvideosList(request); if (list.Count() > 0 && list != null) { objResult.Data = list; objResult.Status = StaticResource.SuccessStatusCode; objResult.Message = StaticResource.SuccessMessage; return(new OkObjectResult(objResult)); } else { objResult.Data = null; objResult.Status = StaticResource.NotFoundStatusCode; objResult.Message = StaticResource.NotFoundMessage; return(new OkObjectResult(objResult)); } } catch (Exception ex) { HttpContext.RiseError(ex); objResult.Data = null; objResult.Status = StaticResource.FailStatusCode; objResult.Message = "Exception occured"; } return(new OkObjectResult(objResult)); }
public async Task <IEnumerable <Application.Dtos.MasterVideos> > GetvideosList(MasterVideosRequest request) { try { IEnumerable <Application.Dtos.MasterVideos> list = new List <Application.Dtos.MasterVideos>(); using (IDbConnection con = new SqlConnection(_connectionString)) { list = await con.QueryAsync <Application.Dtos.MasterVideos>("dbo.SSP_getVideoList", new { VideoName = request.VideosName, OffSet = request.OffSet, Limit = request.Limit, sessionGuid = request.sessionGuid }, commandType : CommandType.StoredProcedure); } return(list); } catch (Exception ex) { throw ex; } }
public async Task <IEnumerable <Application.Dtos.MasterVideos> > GetvideosList(MasterVideosRequest request) { try { return(await this._superAdminRepo.GetvideosList(request)); } catch (Exception ex) { throw ex; } }