public async Task <IActionResult> Create([Bind("Id,CompanyName,NumberOfTotalStocks,StocksSold,StockPrice")] Company company) { if (ModelState.IsValid) { _context.Add(company); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(company)); }
public async Task <IActionResult> Create([Bind("Id,BuyerName,EmailAddress")] StocksBuyer stocksBuyer) { if (ModelState.IsValid) { _context.Add(stocksBuyer); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(stocksBuyer)); }