コード例 #1
0
 // GET: Pais/Create
 public IActionResult Create()
 {
     ViewBag.Paises  = _paisService.GetAll();
     ViewBag.Estados = _estadoService.GetAll();
     ViewBag.Cidades = _cidadeService.GetAll();
     return(View());
 }
コード例 #2
0
 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}"
         }));
     }
 }
コード例 #3
0
 public ActionResult ReturnStates() => Ok(_estadoService.GetAll());
コード例 #4
0
 public async Task <ActionResult <List <EstadoViewModel> > > ObterEstados()
 {
     return(_mapper.Map <List <EstadoViewModel> >(await _estadoService.GetAll()));
 }
コード例 #5
0
 public void GetAllTest()
 => Assert.IsNotNull(_estadoService.GetAll());
コード例 #6
0
 public IEnumerable <EstadoViewModel> GetAll()
 {
     return(Mapper.Map <IEnumerable <Estado>, IEnumerable <EstadoViewModel> >(_modelService.GetAll()));
 }
コード例 #7
0
 // GET: Pais/Create
 public IActionResult Create()
 {
     ViewBag.Cidades = _estadoService.GetAll();
     return(View());
 }
コード例 #8
0
 // GET: Pais
 public IActionResult Index()
 {
     return(View(_estadoService.GetAll()));
 }