public RestAdapter(Dictionary <string, object> dict) { string id = (string)dict["id"]; string RestaurantName = (string)dict["RestaurantName"]; int GuestId = (int)dict["GuestId"]; DateTime ActivityDateTime = (DateTime)dict["ActivityDateTime"]; string GuestName = (string)dict["GuestName"]; _RestConBooking = _RestConBooking.SetRestaurantBooking(id, GuestId, "BOOKED", "Restaruant", ActivityDateTime, RestaurantName, GuestName); }
public async Task <bool> AddRestBooking(RestaurantConBooking restaurantConBooking) { if (await _RestBookingDAO.InsertRestConRes(restaurantConBooking)) { return(true); } else { return(false); } }
public async Task <bool> InsertRestConRes(RestaurantConBooking restConBooking) { _context.Add(restConBooking); //Check for successful changes to database //Successful if (await _context.SaveChangesAsync() > 0) { return(true); } //Fail else { return(false); } }