コード例 #1
0
        public async Task <ActionResult> AddPOTW(AddEditPOTWViewModel model)
        {
            model.POTW.AppUser = await siteService.GetAppUserByID(model.POTW.AppUserID);

            if (ModelState.IsValid)
            {
                siteService.AddPOTW(model.POTW);
            }

            model.POTW         = siteService.GetPOTWByID(model.POTW.POTWID);
            model.LoggedInUser = await siteService.GetCurrentUser();

            model.FullNavList = CreateHomeAdminNavList();

            return(View("EditPOTW", model));
        }