public async Task <IActionResult> Create([Bind("Id,Name")] Phone phone) { if (ModelState.IsValid) { _context.Add(phone); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(phone)); }
public async Task <IActionResult> Create([Bind("ID,EMAIL,ID_Department")] Config config) { if (ModelState.IsValid) { _context.Add(config); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(config)); }