public void TestVenueGetAllBands() { Venue newVenue = new Venue("Sobak Sodo", "24343 Utah Ave S Seattle WA 98204", 5, "8AM-12PM", "(206)532-7293"); newVenue.Save(); Band newBand = new Band("James Harrison", "Steeler Nation"); newBand.Save(); newVenue.AddJoinTable(newBand); List <Band> MyBands = newVenue.GetBands(); Assert.AreEqual("James Harrison", MyBands[0].GetName()); }
public ActionResult NewBands(int id) { string name = Request.Form["name"]; string song = Request.Form["song"]; Band NewBand = new Band(name, song); NewBand.Save(); Venue foundVenue = Venue.Find(id); foundVenue.AddJoinTable(NewBand); List <Band> ListBands = foundVenue.GetBands(); return(View(ListBands)); }