コード例 #1
0
 // GET: Alunos/Create
 public ActionResult Create()
 {
     ViewBag.AlunoId = new SelectList(_alunoApp.GetAll(), "AlunoId", "Nome");
     return(View());
 }
コード例 #2
0
        // GET: Alunos
        public ActionResult Index()
        {
            var alunoViewModel = Mapper.Map <IEnumerable <Aluno>, IEnumerable <AlunoViewModel> >(_alunoApp.GetAll());

            return(View(alunoViewModel));
        }