static void Main(string[] args) { var desaparecidos = new Desaparecidos(); var sinaiVessel = new SinaiVessel(); var youngJesus = new YoungJesus(); var bands = new List <BandBase> { desaparecidos, sinaiVessel, youngJesus }; foreach (var band in bands) { band.Play(); } var atomicHabits = new AtomicHabits(); var dune = new Dune(); var homeland = new Homeland(); var books = new List <BookBase> { atomicHabits, dune, homeland }; foreach (var book in books) { book.ListInfo(); } }
public History() { Homeland = new Homeland(); FamilyTree = new FamilyTree(); ClassOriginStory = new ClassOrigin(); Drawback = new Drawback(); BirthCircumstance = new BirthCircumstance(); }
public ActionResult DeleteConfirmed(int id) { Homeland homeland = db.MyHomelands.Find(id); db.MyHomelands.Remove(homeland); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "HomelandId,HomelandName")] Homeland homeland) { if (ModelState.IsValid) { db.Entry(homeland).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(homeland)); }
public ActionResult Create([Bind(Include = "HomelandId,HomelandName")] Homeland homeland) { if (ModelState.IsValid) { db.MyHomelands.Add(homeland); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(homeland)); }
// GET: Homelands/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Homeland homeland = db.MyHomelands.Find(id); if (homeland == null) { return(HttpNotFound()); } return(View(homeland)); }
public override string ToString() { return(" " + Name + " " + Surname + ", " + Role + ", enrolled in " + EnrollYear + "\nCountry: " + Homeland.ToString()); }