// 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: TipoConta public ActionResult Index() { var tipoContaviewModel = Mapper.Map <IEnumerable <TipoConta>, IEnumerable <TipoContaViewModel> >(_tipoContaApp.List()); return(View(tipoContaviewModel)); }