public async Task <IActionResult> Create([Bind("Id,Name")] Profession profession) { if (ModelState.IsValid) { _context.Add(profession); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(profession)); }
public async Task <IActionResult> Create([Bind("Id,Name,BirthDate,CEP,AddressNumber,Complement")] Admin admin) { if (ModelState.IsValid) { _context.Add(admin); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(admin)); }
public async Task <IActionResult> Create([Bind("Id,Name")] Department department) { if (ModelState.IsValid) { _context.Add(department); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(department)); }
public async Task <IActionResult> Create([Bind("Id,NameCompany,URL")] Company company) { if (ModelState.IsValid) { _context.Add(company); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(company)); }