Esempio n. 1
0
        public async Task <JsonResult> Add(AddAreaDto model)
        {
            var result = await _areaAppService.Add(model);

            OutputModel outputModel = new OutputModel();

            outputModel.Data = result;
            return(new JsonResult(outputModel));
        }
        public ActionResult Create(AreaViewModel areaViewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(areaViewModel));
            }

            _areaAppService.Add(areaViewModel);
            return(RedirectToAction("Index"));
        }