public ActionResult Create() { Dictionary <string, object> model = new Dictionary <string, object>(); model.Add("allPeople", People.GetAll()); model.Add("allRestaurants", Restaurants.GetAll()); return(View(model)); }
public ActionResult Index() { List <Restaurants> restaurantList = new List <Restaurants> { }; restaurantList = Restaurants.GetAll(); return(View(restaurantList)); }
public void GetRestaurants_GetsSetsRestaurant_ReturnEqualValue() { Restaurants newRestaurant = new Restaurants("Taco Bell", 1); newRestaurant.Save(); string nameResult = newRestaurant.RestaurantName; List <Restaurants> listResult = Restaurants.GetAll(); List <Restaurants> actualRestaurantList = new List <Restaurants>() { newRestaurant }; Assert.AreEqual("Taco Bell", nameResult); CollectionAssert.AreEqual(actualRestaurantList, listResult); }
// GET api/restaurant/ public ICollection <RestaurantViewModel> Get() { return(Restaurants.GetAll()); }