public ActionResult EditSpecials(int Id) { LocalAPICall localAPICall = new LocalAPICall(); List <Special> ListSpecials = localAPICall.GetLocal().Result; var selectedSpecial = ListSpecials.Where(l => l.Id == Id); return(View(selectedSpecial)); }
public ActionResult EditSpecials(Special selectedSpecial) { LocalAPICall localAPICall = new LocalAPICall(); localAPICall.PutLocal(selectedSpecial); return(RedirectToAction("MapAsync")); }
public async Task <ActionResult> AddSpecials(Special special) { YelpAPICall yelpAPICall = new YelpAPICall(); Special result = yelpAPICall.GetReviewAndPrice(special.City, special.Restaurant); special.Rating = result.Rating; special.Price = result.Price; LocalAPICall localAPICall = new LocalAPICall(); await localAPICall.PostLocal(special); return(RedirectToAction("MapAsync")); }