private List <Sector> GetSectors() { var sectorList = new SectorServices().GetAllOrderedSectors() ?? new List <Sector>(); if (!sectorList.Any()) { return(new List <Sector>()); } return(sectorList); }
public ViewResult Sectors() { var sectorList = new SectorServices().GetAllOrderedSectors() ?? new List <Sector>(); if (!sectorList.Any()) { ViewBag.Title = "Sector Set Up"; return(View(sectorList)); } sectorList.Remove(sectorList.Find(m => m.SectorId == (int)OtherNotAvailable.Not_Available)); ViewBag.Title = "Manage Sectors"; return(View(sectorList)); }