示例#1
0
        public async Task <IActionResult> Create([Bind("SkinootsId,Producer,Model,Size,Price,Quantity,CratedDate")] Skiboots skiboots)
        {
            if (ModelState.IsValid)
            {
                _context.Add(skiboots);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(skiboots));
        }
示例#2
0
        public async Task <IActionResult> Create([Bind("SnowboardsId,Products,Model,Lenght,Price,Quantity,CratedDate")] Snowboards snowboards)
        {
            if (ModelState.IsValid)
            {
                _context.Add(snowboards);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(snowboards));
        }