public async Task <IActionResult> Create([Bind("Id,IdSupplier,Code,Name,Description,FiscalCode,Specie,CreatedAt,CreatedBy,UpdatedAt,UpdatedBy")] Material material) { if (ModelState.IsValid) { _context.Add(material); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(material)); }
public async Task <IActionResult> Create([Bind("Id,CNPJ,CEP,QRCode,RegisterDate")] Supplier supplier) { if (ModelState.IsValid) { _context.Add(supplier); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(supplier)); }