public IEnumerable <Filter> getBranchList(int companyId) { using (AssetManagementEntities entities = new AssetManagementEntities()) { List <Filter> branchFilter = new List <Filter>(); try { var branches = entities.asm_getBranch(companyId); foreach (var branch in branches) { branchFilter.Add(new Filter { id = branch.Id, text = branch.Name }); } return(branchFilter); } catch (Exception e) { } return(branchFilter); } }