public IEnumerable <Filter> getLocationList(int Id, int bId) { using (AssetManagementEntities entities = new AssetManagementEntities()) { List <Filter> locationFilter = new List <Filter>(); try { var locations = entities.asm_getLocations(Id, bId); foreach (var loc in locations) { locationFilter.Add(new Filter { id = loc.Id, text = loc.Name }); } return(locationFilter); } catch (Exception e) { } return(locationFilter); } }