public IActionResult GetRestaurants() { var restaurantEntities = _restaurantInfoRepository.GetRestaurants(); if (restaurantEntities == null) { return(StatusCode(500, "There are no restaurants in the array")); } return(Ok(restaurantEntities)); }