public void DeleteKunde(Kunde kunde)
 {
     using (AutoReservationEntities context = new AutoReservationEntities())
     {
         context.Kunden.Attach(kunde);
         context.DeleteObject(kunde);
         context.SaveChanges();
     }
 }
 public void DeleteReservation(Reservation reservationDelete)
 {
     using (AutoReservationEntities context = new AutoReservationEntities())
     {
         try
         {
             context.Reservationen.Attach(reservationDelete);
             context.DeleteObject(reservationDelete);
             context.SaveChanges();
         }
         catch (OptimisticConcurrencyException ex)
         {
             throw new LocalOptimisticConcurrencyException<Reservation>(ex.Message);
         }
     }
 }
 public void DeleteKunde(Kunde kundeDelete)
 {
     using (AutoReservationEntities context = new AutoReservationEntities())
     {
         try
         {
             context.Kunden.Attach(kundeDelete);
             context.DeleteObject(kundeDelete);
             context.SaveChanges();
         }
         catch (OptimisticConcurrencyException ex)
         {
             throw new LocalOptimisticConcurrencyException<Kunde>(ex.Message);
         }
     }
 }
 public void DeleteAuto(Auto autoDelete)
 {
     using (AutoReservationEntities context = new AutoReservationEntities())
     {
         try
         {
             context.Autos.Attach(autoDelete);
             context.DeleteObject(autoDelete);
             context.SaveChanges();
         }
         catch (OptimisticConcurrencyException ex)
         {
             throw new LocalOptimisticConcurrencyException<Auto>(ex.Message);
         }
     }
 }