public IActionResult Create()
        {
            if (!RoleIs(Role.Administrator))
            {
                return(Forbid());
            }


            return(View(new CreateEntranceForm
            {
                Buildings = GetBuildingsItems(_buildingService.AllActive())
            }));
        }
        public IActionResult List()
        {
            if (!RoleIs(Role.Administrator, Role.Manager, Role.SecurityGuard))
            {
                return(Forbid());
            }


            var buildings = _buildingService.AllActive();

            var buildingsViewModels = _mapper.Map <IEnumerable <BuildingViewModel> >(buildings);

            return(View(buildingsViewModels));
        }