public List <AttemptResultDTO> GetAttemptByUserIdTestId(UserIdTestIdDTO attempt) { var connection = Connection.GetConnection(); string sqlExpression = "Attempt_GetByUserIdTestId"; return(connection.Query <AttemptResultDTO>(sqlExpression, attempt, commandType: CommandType.StoredProcedure).ToList()); }
public IActionResult GetAttemptsByUserIdTestId(int userId, int testId) { StudentDataAccess student = new StudentDataAccess(); Mapper mapper = new Mapper(); UserIdTestIdDTO dTO = new UserIdTestIdDTO(userId, testId); List <AttemptResultOutputModel> model = mapper.ConvertAttemptDTOToAttemptModel(student.GetAttemptsByUserIdTestId(dTO)); return(Ok(model)); }
public List <AttemptResultDTO> GetAttemptsByUserIdTestId(UserIdTestIdDTO attempt) { AttemptManager teacher = new AttemptManager(); return(teacher.GetAttemptByUserIdTestId(attempt)); }