示例#1
0
        // GET: Sectors/Details/5
        public async Task <IActionResult> Details(int?id)
        {
            var currentOrganization = CurrentOrganization();

            if (id == null)
            {
                return(NotFound());
            }

            var sector = await _sectorService.GetSectorWithNoTracking(id.Value);

            if (sector == null)
            {
                return(NotFound());
            }

            var applicationsForSector = await _sectorService.GetApplicationsForSector(id.Value, currentOrganization.Id);

            sector.PopulateSectorApplications(applicationsForSector);


            return(View(new SectorViewModel().Map(sector)));
        }