Example #1
0
        public IActionResult Delete(long?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            //Floor floor = service.FindById(id.Value);

            Tuple <long, Floor, List <Location> > floor = service.GetAllFloorsWithLocations(id.Value);

            if (floor.Item2 == null)
            {
                return(NotFound());
            }

            int qtyLocation = floor.Item3.Count();

            ViewData["Qty"]           = qtyLocation != 0 ? qtyLocation.ToString() : "0";
            ViewData["ListLocations"] = new List <Location>(floor.Item3);

            return(View(floor.Item2));
        }