public async Task <IActionResult> Create([Bind("ID,Balance,Name,UnitSize,ExpectedPriceChange,RiskFreeInterestRate")] TradingAccount tradingAccount) { if (ModelState.IsValid) { _context.Add(tradingAccount); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(tradingAccount)); }
public async Task <IActionResult> Create([Bind("ID,Ask,Bid,Contents,Delta,Quantity,Strike")] Option option) { if (ModelState.IsValid) { _context.Add(option); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(option)); }