public IActionResult SearchStatus(string q, int?currentId = null) { var statuses = _shortcutService.SearchStatus(new IdRequestFilter <int?> { Id = currentId }, q); if (statuses == null || !statuses.Any()) { return(Json(new List <Select2ItemModel>())); } var categorySeletions = statuses .Select(x => new Select2ItemModel { Id = x.Id.ToString(), Text = x.Text }); return(Json(categorySeletions)); }