Пример #1
0
        // GET: CidadeModels/Details/5
        public async Task <IActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var lojaModel = await _repositoryLoja.GetAsync(id.Value);

            ViewData["ShoppingId"] = new SelectList(_repositoryShopping.GetAll(), "ShoppingId", "Nome");

            if (lojaModel == null)
            {
                return(NotFound());
            }

            return(View(lojaModel));
        }
Пример #2
0
        // GET: ShoppingModels/Details/5
        public async Task <IActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var shoppingModel = await _repositoryShopping.GetAsync(id.Value);

            ViewData["EnderecoId"] = new SelectList(_repositoryEndereco.GetAll(), "EnderecoId", "Rua");

            if (shoppingModel == null)
            {
                return(NotFound());
            }

            return(View(shoppingModel));
        }
Пример #3
0
        // GET: CidadeModels/Details/5
        public async Task <IActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var cidadeModel = await _repositoryCidade.GetAsync(id.Value);

            ViewData["EstadoId"] = new SelectList(_repositoryEstado.GetAll(), "EstadoId", "Nome");

            if (cidadeModel == null)
            {
                return(NotFound());
            }

            return(View(cidadeModel));
        }
Пример #4
0
        public IActionResult Index()
        {
            ViewData["EstadoId"] = _repositoryEstado.GetAll();

            return(View());
        }