public async Task <IActionResult> Create([Bind("Id,RazaoSocial,Endereco")] Loja loja) { if (ModelState.IsValid) { _context.Add(loja); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(loja)); }
public async Task <IActionResult> Create([Bind("Id,Descricao")] Bairro bairro) { if (ModelState.IsValid) { _context.Add(bairro); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(bairro)); }
public void CreateBairro(Bairro cupcake) { _context.Add(cupcake); _context.SaveChanges(); }