Beispiel #1
0
        public IActionResult Delete(ForFun forFun)
        {
            var tempId = forFun.ItineraryId;

            funRepo.Delete(forFun);
            return(RedirectToAction("Details", "Itinerary", new { id = tempId }));
        }
Beispiel #2
0
    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);
    }
Beispiel #3
0
        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);
 }
Beispiel #5
0
        public ViewResult Delete(int id)
        {
            ForFun model = funRepo.GetById(id);

            return(View(model));
        }
Beispiel #6
0
 public IActionResult Update(ForFun forFun)
 {
     funRepo.Update(forFun);
     return(RedirectToAction("Details", "Itinerary", new { id = forFun.ItineraryId }));
 }
Beispiel #7
0
 public IActionResult Delete(ForFun forFun)
 {
     funRepo.Delete(forFun);
     return(RedirectToAction("Index", "ForFun"));
 }
Beispiel #8
0
 public IActionResult Create(ForFun forFun)
 {
     funRepo.Create(forFun);
     return(RedirectToAction("Index"));
 }