コード例 #1
0
        public async Task <ActionResult> Add(PromoCreateViewModel model)
        {
            if (ModelState.IsValid)
            {
                int promoId = await PromoService.Save(model, (Session["User"] as UserModel).Id);

                return(RedirectToAction("Info", new { id = promoId }));
            }

            return(View(model));
        }