// GET: Pais/Create public IActionResult Create() { ViewBag.Paises = _paisService.GetAll(); ViewBag.Estados = _estadoService.GetAll(); ViewBag.Cidades = _cidadeService.GetAll(); return(View()); }
public IActionResult GetAll() { try { return(Ok( new Response { IsSuccess = true, Data = _IEstadoService.GetAll() })); } catch (Exception ex) { return(BadRequest( new Response { IsSuccess = false, Message = $"No se pudo generar el listado >> {ex.Message}" })); } }
public ActionResult ReturnStates() => Ok(_estadoService.GetAll());
public async Task <ActionResult <List <EstadoViewModel> > > ObterEstados() { return(_mapper.Map <List <EstadoViewModel> >(await _estadoService.GetAll())); }
public void GetAllTest() => Assert.IsNotNull(_estadoService.GetAll());
public IEnumerable <EstadoViewModel> GetAll() { return(Mapper.Map <IEnumerable <Estado>, IEnumerable <EstadoViewModel> >(_modelService.GetAll())); }
// GET: Pais/Create public IActionResult Create() { ViewBag.Cidades = _estadoService.GetAll(); return(View()); }
// GET: Pais public IActionResult Index() { return(View(_estadoService.GetAll())); }