Example #1
0
        public async Task <IActionResult> Add(TagViewModel tagViewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(tagViewModel));
            }

            var tag = tagViewModel.GetEntity();
            await tagRepository.Add(tag);

            return(RedirectToAction("Index", "Home", new { Area = "Admin" }));
        }