public async Task <IActionResult> Create([Bind("id,Name,Salers,ProdactType, Weight, Count, Price")] Prodacts prodacts) { if (ModelState.IsValid) { _context.Add(prodacts); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(prodacts)); }
public async Task <IActionResult> Create([Bind("id,Name")] ProdactType prodactType) { if (ModelState.IsValid) { _context.Add(prodactType); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(prodactType)); }