Example #1
0
        public IActionResult GetRegionsAsSelect(int id)
        {
            var query = _regionService.Filter(s => s.CountryId == id)
                        .Select(a => new SelectListItem
            {
                Value    = a.Id,
                Text     = a.Name.Translate(),
                Selected = false
            });

            return(Ok(query));
        }