Example #1
0
        public async Task <IEnumerable <TagResponse> > GetAllTagsAsync()
        {
            List <TagResponse> categoriesResponse = new List <TagResponse>();
            var categories = await _tagBaseServices.GetListAsync(x => x.Visible).ConfigureAwait(false);

            if (categories is null)
            {
                return(null);
            }
            foreach (var cat in categories)
            {
                categoriesResponse.Add(new TagResponse {
                    TagID = cat.Id, Name = cat.Name
                });
            }
            return(categoriesResponse);
        }