public JsonResult GetCompaniesFilter() { var companies = new List <SelectItemModel>(); companies.Add(new SelectItemModel { Value = "", Text = DictExpressionBuilderSystem.Translate("Search.All") }); using (var logic = new LineLogic()) { var getCompanies = logic.GetCompaniesFilter(); companies.AddRange(getCompanies .Where(w => w != null) .Select(z => new SelectItemModel { Value = z.pk.ToString(), Text = z.companyName }).ToList()); } return(new JsonResult { Data = companies }); }