Esempio n. 1
0
        public async Task <ActionResult> AddDecoration(DecorationTypeViewModel decoration)
        {
            if (!ModelState.IsValid)
            {
                ViewBag.Types = _roomService.GetTypes();
                return(View("ControlDecorations"));
            }

            await _roomService.AddTypeAsync(_mapper.Map <DecorationType>(decoration));

            return(RedirectToAction("Index"));
        }