Exemplo n.º 1
0
        public List <AttemptResultDTO> GetAttemptByUserIdTestId(UserIdTestIdDTO attempt)
        {
            var    connection    = Connection.GetConnection();
            string sqlExpression = "Attempt_GetByUserIdTestId";

            return(connection.Query <AttemptResultDTO>(sqlExpression, attempt, commandType: CommandType.StoredProcedure).ToList());
        }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
        public List <AttemptResultDTO> GetAttemptsByUserIdTestId(UserIdTestIdDTO attempt)
        {
            AttemptManager teacher = new AttemptManager();

            return(teacher.GetAttemptByUserIdTestId(attempt));
        }