Beispiel #1
0
        public async Task <IActionResult> Create(Coupon coupon)
        {
            if (ModelState.IsValid)
            {
                var file = HttpContext.Request.Form.Files;
                if (!await iCouponRepository.CreateCouponPost(file, coupon))
                {
                    return(NotFound());
                }

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

            return(View(coupon));
        }