public async Task <IActionResult> Create([Bind("idDpto,dsDpto")] Departamento departamento) { if (ModelState.IsValid) { _context.Add(departamento); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(departamento)); }
public async Task <IActionResult> Create([Bind("idServico,dsServico")] Servico servico) { if (ModelState.IsValid) { _context.Add(servico); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(servico)); }