Example #1
0
        public GetTagsDTO GetTagById(int id)
        {
            Tag        tag     = _tagRepository.GetById(id);
            GetTagsDTO tagsDTO = new GetTagsDTO()
            {
                id   = tag.id,
                tags = tag.tags
            };

            return(tagsDTO);
        }
Example #2
0
        public IList <GetTagsDTO> GetTags()
        {
            IList <Tag>        tags     = _tagRepository.Table.ToList <Tag>();
            IList <GetTagsDTO> tagsList = new List <GetTagsDTO>();

            foreach (var tag in tags)
            {
                GetTagsDTO tagsDTO = new GetTagsDTO()
                {
                    id   = tag.id,
                    tags = tag.tags
                };
                tagsList.Add(tagsDTO);
            }
            return(tagsList);
        }
        // GET: Tags/Delete/5
        public ActionResult Delete(int id)
        {
            GetTagsDTO tag = _tagsService.GetTagById(id);

            return(View(tag));
        }