public IActionResult GetAll() { try { var rawTags = _repository.GetAllTags().ToList(); if (rawTags == null || rawTags.Count() == 0) { return(NoContent()); } var uniqueTags = new List <string>(); rawTags.ForEach(x => uniqueTags.AddRange(x.Split(";"))); uniqueTags = uniqueTags.Distinct().OrderBy(x => x).ToList(); return(Ok(uniqueTags)); } catch (Exception ex) { var details = new ProblemDetails() { Title = ex.GetType().ToString(), Detail = ex.Message }; return(StatusCode(StatusCodes.Status500InternalServerError, details)); } }