public async Task <IActionResult> getdata([FromQuery] cardParams cardParams)
      {
          var acssessdata = await _repo.GetDataAsync(cardParams);

          Response.AddPagination(acssessdata.CurrentPage, acssessdata.PageSize, acssessdata.TotalCount, acssessdata.TotalPages);

          return(Ok(acssessdata));
      }
        public async Task <PagedList <TEvtEvent> > GetDataAsync(cardParams cardParams)
        {
            var AcssessData = _contextt.T_Evt_Event.Where(x => x.CardNo == getcardByid(cardParams.id)).OrderByDescending(x => x.EventTime).AsQueryable();;

            return(await PagedList <TEvtEvent> .CreateAsync(AcssessData, cardParams.PageNumber, cardParams.PageSize));
        }