public IActionResult Delete(ForFun forFun) { var tempId = forFun.ItineraryId; funRepo.Delete(forFun); return(RedirectToAction("Details", "Itinerary", new { id = tempId })); }
public static void Main() { ForFun fun = new ForFun(); ForFun2 fun2 = new ForFun2(); Thread ti = new Thread(new ThreadStart(() => fun.Fun())); ti.Start(); Thread ti2 = new Thread(new ThreadStart(() => fun2.Fun2())); ti2.Start(); // Thread ti3 = new Thread(new ThreadStart(() => ForFun3.Fun3())); ti3.Start(); //Console.WriteLine("Press ESC to stop"); do { while (!Console.KeyAvailable) { // Do something Window.DestroyAllWindows(); } } while (Console.ReadKey(true).Key != ConsoleKey.Escape); }
public IActionResult CountLikes(int funId, int itinId) { ForFun model = funRepo.GetById(funId); model.Like++; funRepo.Update(model); return(RedirectToAction("Details", "Itinerary", new { id = itinId })); }
public ForFunModelTests() { myForFun = new ForFun(1, DateTime.Today, 45.00, false, "Orlando", "Didny Worl", 1); }
public ViewResult Delete(int id) { ForFun model = funRepo.GetById(id); return(View(model)); }
public IActionResult Update(ForFun forFun) { funRepo.Update(forFun); return(RedirectToAction("Details", "Itinerary", new { id = forFun.ItineraryId })); }
public IActionResult Delete(ForFun forFun) { funRepo.Delete(forFun); return(RedirectToAction("Index", "ForFun")); }
public IActionResult Create(ForFun forFun) { funRepo.Create(forFun); return(RedirectToAction("Index")); }