using OrderCriterias; using System.Collections.ObjectModel; namespace ManagerInterfaces { /// /// All methods to handle answers /// /// a DTO or Entity type answer public interface IAnswerManager { /// /// get the number of T element /// /// the number of T element abstract int getNbElement(); /// /// get a part of all answers /// /// the actual page /// number of T element in a page /// the order criteria /// /// all T element of the database for /// this page (or null if (nb-1)*count /// is outside boundaries (0, getNbElement()-1) /// public IEnumerable? getAnswers(int nb, int count, AnswerOrderCriteria orderCriteria = AnswerOrderCriteria.ById); /// /// get a T element with an id /// /// the id of the T element question /// /// a set of all T element that correspond to this question /// public ReadOnlyCollection? getAnswersByIdQuestion(long id); /// /// modified a T element with an id /// /// the id of the T element /// an answer that contains all modified properties /// /// the T element (modified) that corresponde /// to the id or null if there isn't any /// public T? modifierAnswer(long id, T answer); /// /// delete a T element with an id /// /// the id of the T element /// /// the T element deleted that corresponde /// to the id or null if there isn't any /// public T? supprimerAnswer(long id); /// /// delete a T element /// /// the T element to delete public void supprimerAnswer(T answer); /// /// add a T element /// /// the answer to add /// /// the T element (modified) that corresponde /// to the id or null if there isn't any /// public T ajouterAnswer(T answer); } }