public bool DeleteStayType(StayType stayType)
        {
            var context = new HotelBookingContext();

            context.Entry(stayType).State = System.Data.Entity.EntityState.Deleted;

            return(context.SaveChanges() > 0);
        }
 public ActionResult Edit([Bind(Include = "Id,Name,Email")] Customer customer)
 {
     if (ModelState.IsValid)
     {
         db.Entry(customer).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(customer));
 }
Exemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "Id,Description")] Room room)
 {
     if (ModelState.IsValid)
     {
         db.Entry(room).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(room));
 }
 public void Update(RoomCategory item)
 {
     db.Entry(item).State = EntityState.Modified;
 }
 public void Update(HotelRoomMap item)
 {
     db.Entry(item).State = EntityState.Modified;
 }
Exemplo n.º 6
0
 public void Update(Hotel hotel)
 {
     db.Entry(hotel).State = EntityState.Modified;
 }
Exemplo n.º 7
0
 public void Update(Client client)
 {
     db.Entry(client).State = EntityState.Modified;
 }
Exemplo n.º 8
0
 public void Edit(Booking entity)
 {
     db.Entry(entity).State = EntityState.Modified;
     db.SaveChanges();
 }
Exemplo n.º 9
0
 public Booking Edit(Booking entity)
 {
     db.Entry(entity).State = EntityState.Modified;
     db.SaveChanges();
     return(null);
 }
Exemplo n.º 10
0
 public void Update(Booking booking)
 {
     db.Entry(booking).State = EntityState.Modified;
 }
 public void Update(PriceOfHotelCategory item)
 {
     db.Entry(item).State = EntityState.Modified;
 }