Esempio n. 1
0
        public async Task <ActionResult> UnOccupyAll(int projectId)
        {
            var project = await ProjectRepository.GetProjectWithDetailsAsync(projectId);

            if (project == null)
            {
                return(HttpNotFound($"Project {projectId} not found"));
            }
            if (!project.Details.EnableAccommodation)
            {
                return(RedirectToAction("Edit", "Game"));
            }

            await _accommodationService.UnOccupyAll(projectId);

            return(RedirectToAction("Index"));
        }