public IActionResult CreateActivity(ValidActivitie activitie)
        {
            if (ModelState.IsValid)
            {
                if (activitie.Date < DateTime.Now)
                {
                    ModelState.AddModelError("Date", "Date must be in the future.");
                    return(View("New"));
                }
                else
                {
                    // go through all of this users events and see if the requested time conflicts with any of their current times
                    // set conflictCheck to 1 if conflict, or 0 if no conflict
                    int conflict             = 0;
                    var sessuid              = HttpContext.Session.GetInt32("user_id");
                    List <Activitie> ActList = _context.Activities.Include(p => p.Participant).ThenInclude(u => u.PartId).ToList();
                    System.Console.WriteLine("Before crazy FOreach Bug..... ");
                    foreach (var item in ActList)
                    {
                        if (item.Date.Day == activitie.Date.Day && item.Date.Hour == item.Date.Hour && item.Date.Minute == activitie.Date.Minute && item.Date.Month == activitie.Date.Month)
                        {
                            conflict = 1;
                        }
                        // if (item.DurationMod == "Hours"){
                        //     int Temp = item.Date.AddHours(item.Duration);
                        //     {
                        //         if(item.Date.Hour < activitie.Date.Hour && Temp > activitie.Date.Hour)
                        //         {
                        //             conflict = 1;
                        //         }

                        //     }
                        // }
                        //  if (item.DurationMod == "minutes"){
                        //     //  add minutes and calc
                        //  }
                        //  if (item.DurationMod == "Days")
                        //  {
                        //     //  add days and calc
                        //  }
                    }
                    if (conflict == 1)
                    {
                        ModelState.AddModelError("Date", "You're already committed at that time!");
                        return(View("New"));
                    }
                    else
                    {
                        BuildActivity(activitie);
                        return(RedirectToAction("Index"));
                    }
                }
            }
            return(RedirectToAction("NewActivity"));
        }
        private void BuildActivity(ValidActivitie activity)
        {
            Activitie NewActivity = new Activitie {
                Title       = activity.Title,
                Description = activity.Description,
                Date        = activity.Date,
                Time        = activity.Time,
                Duration    = activity.Duration,
                DurationMod = activity.DurationMod,
                CreatorId   = activity.CreatorId,
                CreatedAt   = DateTime.Now,
                UpdatedAt   = DateTime.Now
            };

            _context.Activities.Add(NewActivity);
            _context.SaveChanges();
        }