You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
WF-PmAPI/WF_EF_Api/Shared/IQuizService.cs

42 lines
1.7 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Shared
{
public interface IQuizService<TQuiz>
{
// Retrieves a specific quiz by its unique identifier (id).
// 'id' is the unique identifier of the quiz to be retrieved.
Task<TQuiz> GetQuizById(int id);
// Retrieves all quizzes, with pagination support.
// This returns a list of all quizzes in the system.
Task<PaginationResult<TQuiz>> GetAllQuiz();
// Retrieves a subset of quizzes based on the provided index and page size.
// 'index' is the starting point for pagination (page number).
// 'pageSize' is the number of quizzes per page.
Task<PaginationResult<TQuiz>> GetSomeQuiz(int index, int pageSize);
// Adds a new quiz to the system.
// 'quiz' is the quiz object that will be added to the system.
Task AddQuiz(TQuiz quiz);
// Updates an existing quiz identified by its unique identifier ('quizId').
// 'quizId' is the unique identifier of the quiz to be updated
// 'quiz' contains the updated quiz data.
Task UpdateQiz(int quizId, TQuiz quiz);
// Removes a quiz from the system based on its unique identifier ('quizId').
// 'quizId' is the unique identifier of the quiz to be removed from the system.
Task RemoveQuiz(int quizId);
// Retrieves the number of questions in a specific quiz identified by its unique identifier ('quizId').
// 'quizId' is the unique identifier of the quiz for which the number of questions is requested.
Task<int> GetNbQuestionQuiz(int quizId);
}
}