public ActionResult Create() { string tomorrowWeather = WeatherAPI.CallAPITomorrowWeather(); ViewBag.weather = tomorrowWeather; return(View()); }
public ActionResult Create(EoDLunchOrderModels Model) { db.Lunch.Add(Model); DateTime Clock = DateTime.Now; Model.DayOfWeek = (int)Clock.DayOfWeek; Model.TomorrowsWeather = WeatherAPI.CallAPITomorrowWeather(); Model.Date = DateTime.Now.ToString("dd/MM/yyyy"); db.SaveChanges(); return(RedirectToAction("Bingus", "EoDLunchOrderController")); }