private void SetupMissingWeeks()
        {
            BuffetRotatingWeek newWeek = new BuffetRotatingWeek();
            //get most recent week
            BuffetRotatingWeek recentMostWeek = _dbContext.BuffetRotatingWeeks
                .Include("Meat.NextItem")
                .Include("Casserole.NextItem")
                .Include("Corn.NextItem")
                .Include("Beans.NextItem").OrderByDescending(brw => brw.SundayDate).First();

            newWeek.SundayDate = recentMostWeek.SundayDate.AddDays(7);
            newWeek.Meat = recentMostWeek.Meat.NextItem;
            newWeek.Casserole = recentMostWeek.Casserole.NextItem;
            newWeek.Corn = recentMostWeek.Corn.NextItem;
            newWeek.Beans = recentMostWeek.Beans.NextItem;

            _dbContext.BuffetRotatingWeeks.Add(newWeek);
            _dbContext.SaveChanges();
        }
        public ActionResult EditRotating(BuffetRotatingWeek week)
        {
            if (ModelState.IsValid)
            {
                BuffetRotatingWeek oldWeek = _dbContext.BuffetRotatingWeeks.First(bi => bi.Id == week.Id);

                int meatId;
                int cornId;
                int casseroleId;
                int beansId;

                if (int.TryParse(Request.Form["Meat.Id"], out meatId) &&
                    int.TryParse(Request.Form["Corn.Id"], out cornId) &&
                    int.TryParse(Request.Form["Casserole.Id"], out casseroleId) &&
                    int.TryParse(Request.Form["Beans.Id"], out beansId))
                {
                    oldWeek.Meat = _dbContext.BuffetSchedules.First(bi => bi.Id == meatId);
                    oldWeek.Corn = _dbContext.BuffetSchedules.First(bi => bi.Id == cornId);
                    oldWeek.Casserole = _dbContext.BuffetSchedules.First(bi => bi.Id == casseroleId);
                    oldWeek.Beans = _dbContext.BuffetSchedules.First(bi => bi.Id == beansId);
                    oldWeek.SundayDate = week.SundayDate;

                    _dbContext.SaveChanges();

                    return RedirectToAction("Index");
                }
            }

            ViewBag.FoodTypes = new SelectList(_dbContext.FoodTypes.ToList(), "Id", "Name");
            return View(week);
        }