public bool DeleteTrip(Trip trip) { throw new NotImplementedException(); }
public Reservation CreateCustomerReservation(Trip trip, Customer customer, double totalPrice, int numberOfPeople, Vehicle vehicle) { throw new NotImplementedException(); }
public Trip CreateTrip(Trip trip) { throw new NotImplementedException(); }
public bool DeleteTrip(Trip trip) { return db.TripList.Remove(trip); }
public Trip CreateTrip(Trip trip) { db.TripList.Add(trip); return trip; }
public Trip UpdateTrip(Trip trip) { var old = db.TripList.Single(x => x.TripId == trip.TripId); db.TripList[db.TripList.IndexOf(old)] = trip; return trip; }
public Reservation CreateCustomerReservation(Trip trip, Customer customer, double totalPrice, int numberOfPeople, Vehicle vehicle) { var reservation = new Reservation {ReservationId = (db.ReservationList.Count+1), CustomerId = customer.CustomerId, TripId = trip.TripId, VehicleId = vehicle.VehicleId, TotalPrice = totalPrice, NumberOfPeople = numberOfPeople }; db.ReservationList.Add(reservation); return reservation; }