Ejemplo n.º 1
0
        public async Task <IActionResult> AddNewTag(TagModel tag)
        {
            if (ModelState.IsValid)
            {
                int id = await _tagRepository.AddNewTag(tag);

                if (id > 0)
                {
                    return(RedirectToAction(nameof(AddNewTag), new { isSuccess = true, tagId = id }));
                }
            }
            return(View());
        }