// GET: Cliente/Create public ActionResult Create() { ViewBag.TipoContasList = new SelectList(Mapper.Map <List <TipoContaViewModel> >(_tipoContaApp.List().ToList()), "IdTipoConta", "NomeTipoConta"); ViewBag.ClientesList = new SelectList(Mapper.Map <List <ClienteViewModel> >(_clienteApp.List().ToList()), "IdCliente", "Nome"); ViewBag.AgenciasList = new SelectList(Mapper.Map <List <AgenciaViewModel> >(_agenciaApp.List().ToList()), "IdAgencia", "NomeAgencia"); return(View()); }
// GET: Cliente public ActionResult Index() { var _clienteViewModel = Mapper.Map <IEnumerable <Cliente>, IEnumerable <ClienteViewModel> >(_clienteApp.List()); return(View(_clienteViewModel)); }