Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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));
        }