From 6d808b7a6ef7b09fde3c357aad32f70347f5946f Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Thu, 23 Aug 2018 22:47:39 +0200 Subject: [PATCH] fix a copy paste error --- Plattform/Plattform/DB/AvailabiltyDB.cs | 16 ++++++++-------- Plattform/Plattform/DB/HotelDB.cs | 16 ++++++++-------- Plattform/Plattform/DB/RoomDB.cs | 16 ++++++++-------- Plattform/Plattform/DB/RoomTypeDB.cs | 16 ++++++++-------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/Plattform/Plattform/DB/AvailabiltyDB.cs b/Plattform/Plattform/DB/AvailabiltyDB.cs index 8d43bf9..af5d42b 100644 --- a/Plattform/Plattform/DB/AvailabiltyDB.cs +++ b/Plattform/Plattform/DB/AvailabiltyDB.cs @@ -15,13 +15,13 @@ namespace Plattform.DB return ctx.Availabilities.ToList(); } } - public bool CreateAvailability(Availability city) + public bool CreateAvailability(Availability availability) { try { using (Context ctx = new Context()) { - ctx.Availabilities.Add(city); + ctx.Availabilities.Add(availability); ctx.SaveChanges(); } return true; @@ -33,14 +33,14 @@ namespace Plattform.DB } } - public bool UpdateAvailability(Availability city) + public bool UpdateAvailability(Availability availability) { try { using (Context ctx = new Context()) { - ctx.Availabilities.Attach(city); - ctx.Entry(city).State = System.Data.Entity.EntityState.Modified; + ctx.Availabilities.Attach(availability); + ctx.Entry(availability).State = System.Data.Entity.EntityState.Modified; ctx.SaveChanges(); } return true; @@ -52,14 +52,14 @@ namespace Plattform.DB } } - public bool DeleteAvailability(Availability city) + public bool DeleteAvailability(Availability availability) { try { using (Context ctx = new Context()) { - ctx.Availabilities.Attach(city); - ctx.Availabilities.Remove(city); + ctx.Availabilities.Attach(availability); + ctx.Availabilities.Remove(availability); ctx.SaveChanges(); } return true; diff --git a/Plattform/Plattform/DB/HotelDB.cs b/Plattform/Plattform/DB/HotelDB.cs index 741e9a8..518073e 100644 --- a/Plattform/Plattform/DB/HotelDB.cs +++ b/Plattform/Plattform/DB/HotelDB.cs @@ -15,13 +15,13 @@ namespace Plattform.DB return ctx.Hotels.ToList(); } } - public bool CreateHotel(Hotel city) + public bool CreateHotel(Hotel hotel) { try { using (Context ctx = new Context()) { - ctx.Hotels.Add(city); + ctx.Hotels.Add(hotel); ctx.SaveChanges(); } return true; @@ -33,14 +33,14 @@ namespace Plattform.DB } } - public bool UpdateHotel(Hotel city) + public bool UpdateHotel(Hotel hotel) { try { using (Context ctx = new Context()) { - ctx.Hotels.Attach(city); - ctx.Entry(city).State = System.Data.Entity.EntityState.Modified; + ctx.Hotels.Attach(hotel); + ctx.Entry(hotel).State = System.Data.Entity.EntityState.Modified; ctx.SaveChanges(); } return true; @@ -52,14 +52,14 @@ namespace Plattform.DB } } - public bool DeleteHotel(Hotel city) + public bool DeleteHotel(Hotel hotel) { try { using (Context ctx = new Context()) { - ctx.Hotels.Attach(city); - ctx.Hotels.Remove(city); + ctx.Hotels.Attach(hotel); + ctx.Hotels.Remove(hotel); ctx.SaveChanges(); } return true; diff --git a/Plattform/Plattform/DB/RoomDB.cs b/Plattform/Plattform/DB/RoomDB.cs index 06c803c..f160ff4 100644 --- a/Plattform/Plattform/DB/RoomDB.cs +++ b/Plattform/Plattform/DB/RoomDB.cs @@ -14,13 +14,13 @@ namespace Plattform.DB return ctx.Rooms.ToList(); } } - public bool CreateRoom(Room city) + public bool CreateRoom(Room room) { try { using (Context ctx = new Context()) { - ctx.Rooms.Add(city); + ctx.Rooms.Add(room); ctx.SaveChanges(); } return true; @@ -32,14 +32,14 @@ namespace Plattform.DB } } - public bool UpdateRoom(Room city) + public bool UpdateRoom(Room room) { try { using (Context ctx = new Context()) { - ctx.Rooms.Attach(city); - ctx.Entry(city).State = System.Data.Entity.EntityState.Modified; + ctx.Rooms.Attach(room); + ctx.Entry(room).State = System.Data.Entity.EntityState.Modified; ctx.SaveChanges(); } return true; @@ -51,14 +51,14 @@ namespace Plattform.DB } } - public bool DeleteRoom(Room city) + public bool DeleteRoom(Room room) { try { using (Context ctx = new Context()) { - ctx.Rooms.Attach(city); - ctx.Rooms.Remove(city); + ctx.Rooms.Attach(room); + ctx.Rooms.Remove(room); ctx.SaveChanges(); } return true; diff --git a/Plattform/Plattform/DB/RoomTypeDB.cs b/Plattform/Plattform/DB/RoomTypeDB.cs index 904160c..0b27816 100644 --- a/Plattform/Plattform/DB/RoomTypeDB.cs +++ b/Plattform/Plattform/DB/RoomTypeDB.cs @@ -15,13 +15,13 @@ namespace Plattform.DB return ctx.RoomTypes.ToList(); } } - public bool CreateRoomType(RoomType city) + public bool CreateRoomType(RoomType roomType) { try { using (Context ctx = new Context()) { - ctx.RoomTypes.Add(city); + ctx.RoomTypes.Add(roomType); ctx.SaveChanges(); } return true; @@ -33,14 +33,14 @@ namespace Plattform.DB } } - public bool UpdateRoomType(RoomType city) + public bool UpdateRoomType(RoomType roomType) { try { using (Context ctx = new Context()) { - ctx.RoomTypes.Attach(city); - ctx.Entry(city).State = System.Data.Entity.EntityState.Modified; + ctx.RoomTypes.Attach(roomType); + ctx.Entry(roomType).State = System.Data.Entity.EntityState.Modified; ctx.SaveChanges(); } return true; @@ -52,14 +52,14 @@ namespace Plattform.DB } } - public bool DeleteRoomType(RoomType city) + public bool DeleteRoomType(RoomType roomType) { try { using (Context ctx = new Context()) { - ctx.RoomTypes.Attach(city); - ctx.RoomTypes.Remove(city); + ctx.RoomTypes.Attach(roomType); + ctx.RoomTypes.Remove(roomType); ctx.SaveChanges(); } return true;