Ejemplo n.º 1
0
 public List <MstTestModel> GetTestList()
 {
     try
     {
         return(_context.MstTest.Select(x => new MstTestModel()
         {
             Id = x.Id,
             NoOfParticipant = _context.TestAthleteMapping.Where(y => y.testId == x.Id).Count(),
             TestDate = x.TestDate,
             TestType = x.TestType
         }).OrderByDescending(x => x.TestDate).ToList());
     }
     catch (Exception ex)
     {
         _errorLog.BindErrorLogModel("GetTestList", ex.Message, "error");
         return(null);
     }
 }