예제 #1
0
        // GET: Trades/Details/5
        public async Task <IActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var trade = await _repo.GetTrade(id.Value);

            if (trade == null)
            {
                return(NotFound());
            }

            var options = await _repo.GetOptionDetail(id.Value);

            CreateTradeVM vm = new CreateTradeVM
            {
                Trade   = trade,
                Options = options
            };

            return(View(vm));
        }