public async Task <IActionResult> Create([Bind("ID,Name,Value")] Bandwidth bandwidth) { if (ModelState.IsValid) { _context.Add(bandwidth); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(bandwidth)); }
public async Task <IActionResult> Create([Bind("ID,Name,Occupation,TotalSale,IsTotalSalePositiv,Image")] User user) { if (ModelState.IsValid) { _context.Add(user); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(user)); }