示例#1
0
 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));
 }
示例#2
0
        // 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));
        }
示例#3
0
        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;
 }
示例#5
0
 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;
 }
示例#9
0
 public EtudiantServiceTests(IEtudiantService etudiantService)
 {
     this.etudiantService = etudiantService;
 }
示例#10
0
 // constructor
 public EtudiantsController(IEtudiantService etudiantService)
 {
     this.etudiantService = etudiantService;
 }
示例#11
0
 public Utilities(ISpecialiteService specialiteService, IEtudiantService etudiantService)
 {
     _specialiteService = specialiteService;
     _etudiantService   = etudiantService;
 }
示例#12
0
 // GET: Etudiants
 public IActionResult Index([FromServices] IEtudiantService etudiantService)
 {
     return(View(etudiantService.FindAll()));
 }
示例#13
0
 public DiscussionController(IQuestionService questionService, IReponseService reponseService, IEtudiantService etudiantService)
 {
     _questionService = questionService;
     _reponseService  = reponseService;
     _etudiantService = etudiantService;
 }