Exemplo n.º 1
0
        /// <summary>
        /// this method will get the details for the amenities only if it exists
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        // GET: Amenities/Details/5
        public async Task <IActionResult> Details(int id)
        {
            if (id <= 0)
            {
                return(NotFound());
            }

            Amenities amenities = await _context.GetAmenityByIDAsync(id);

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

            return(View(amenities));
        }