예제 #1
0
        public IActionResult GetBusinessFieldCategories(int businessFieldRegulationID, string text)
        {
            var getBusinessCategory = _organizationUnitProvider.GetBusinessFieldCategories(businessFieldRegulationID);

            if (!string.IsNullOrEmpty(text))
            {
                getBusinessCategory = getBusinessCategory.Where(s => s.Name.IndexOf(text, StringComparison.OrdinalIgnoreCase) >= 0);
            }
            return(Ok(getBusinessCategory.Select(x => new { Value = x.Id, Text = x.Name })));
        }