public IActionResult Create([Bind("Id,nom,prenom,age")] Etudiant etudiant, [FromServices] IEtudiantService etudiantService) { if (ModelState.IsValid) { etudiantService.Save(etudiant); return(RedirectToAction(nameof(Index))); } return(View(etudiant)); }
// GET: Etudiants/Details/5 public IActionResult Details([FromServices] IEtudiantService etudiantService, int id) { var etudiant = etudiantService.GetEtudiantById(id); if (etudiant == null) { return(NotFound()); } return(View(etudiant)); }
public void GetDouble_AvecValeur3_Retourne6() { Mock <IEtudiantService> chk = new Mock <IEtudiantService>(); IEtudiantService foo = chk.Object; chk.Setup(x => x.GetDouble(51)).Returns(10); var etudiantService = new Moq.Mock <IEtudiantService>(); etudiantService.Setup(m => m.GetDouble(6)).Returns(6); // Assert.AreEqual(obje.insertEmployee(chk.Object), true); }
public DocumentController(IDocumentNonOfficielService documentNonOfficielService, IDocumentOfficielService documentOfficielService, ISpecialiteModuleService specialiteModuleService, IModuleService moduleService, IEtudiantService etudiantService, IProfesseurModuleService professeurModuleService, IProfesseurSpecialiteService professeurSpecialiteService, ISpecialiteService specialiteService, IProfesseurService professeurService) { _documentNonOfficielService = documentNonOfficielService; _documentOfficielService = documentOfficielService; _specialiteModuleService = specialiteModuleService; _moduleService = moduleService; _etudiantService = etudiantService; _professeurSpecialiteService = professeurSpecialiteService; _professeurModuleService = professeurModuleService; _specialiteService = specialiteService; _professeurService = professeurService; }
public HomeController(IUtilities utilities, IEtudiantService etudiantService, INotificationService notificationService, ISpecialiteService specialiteService, IProfesseurService professeurService, IModuleService moduleService, IAdministrateurService administrateurService, IProfesseurSpecialiteService professeurSpecialiteService, IAnnonceService annonceService) { _utilities = utilities; _administrateurService = administrateurService; _etudiantService = etudiantService; _notificationService = notificationService; _specialiteService = specialiteService; _moduleService = moduleService; _professeurService = professeurService; _professeurSpecialiteService = professeurSpecialiteService; _annonceService = annonceService; }
public ProfesseurController(IUtilities utilities, IEtudiantService etudiantService, IDocumentNonOfficielService documentNonOfficielService, IDocumentOfficielService documentOfficielService, IMessageService messageService, IModuleService moduleService, IAnnonceService annonceService, INotificationService notificationService, ISpecialiteService specialiteService, IProfesseurService professeurService, IProfesseurModuleService professeurModuleService) { _utilities = utilities; _etudiantService = etudiantService; _documentNonOfficielService = documentNonOfficielService; _documentOfficielService = documentOfficielService; _messageService = messageService; _annonceService = annonceService; _notificationService = notificationService; _specialiteService = specialiteService; _moduleService = moduleService; _professeurService = professeurService; _professeurModuleService = professeurModuleService; }
public AdministrateurController(IUtilities utilities, IEtudiantService etudiantService, ISpecialiteModuleService specialiteModuleService, ISpecialiteService specialiteService, IAnnonceService annonceService, IProfesseurService professeurService, IAdministrateurService administrateurService, IResultatService resultatService, IProfesseurModuleService professeurModuleService, IModuleService moduleService, IProfesseurSpecialiteService professeurSpecialiteService) { _administrateurService = administrateurService; _etudiantService = etudiantService; _professeurService = professeurService; _utilities = utilities; _specialiteService = specialiteService; _annonceService = annonceService; _resultatService = resultatService; _moduleService = moduleService; _professeurSpecialiteService = professeurSpecialiteService; _professeurModuleService = professeurModuleService; _specialiteModuleService = specialiteModuleService; _logger = Log4NetHelper.GetLogger(typeof(AdministrateurController)); }
public EtudiantServiceController(IEtudiantService e, IFiliereService f) { this.filiereService = f; this.etudiantService = e; }
public EtudiantServiceTests(IEtudiantService etudiantService) { this.etudiantService = etudiantService; }
// constructor public EtudiantsController(IEtudiantService etudiantService) { this.etudiantService = etudiantService; }
public Utilities(ISpecialiteService specialiteService, IEtudiantService etudiantService) { _specialiteService = specialiteService; _etudiantService = etudiantService; }
// GET: Etudiants public IActionResult Index([FromServices] IEtudiantService etudiantService) { return(View(etudiantService.FindAll())); }
public DiscussionController(IQuestionService questionService, IReponseService reponseService, IEtudiantService etudiantService) { _questionService = questionService; _reponseService = reponseService; _etudiantService = etudiantService; }