public List<Reservation> GetAllCustomerReservations(Customer customer) { throw new NotImplementedException(); }
public bool CreateCustomer(Customer customer) { throw new NotImplementedException(); }
public Reservation CreateCustomerReservation(Trip trip, Customer customer, double totalPrice, int numberOfPeople, Vehicle vehicle) { throw new NotImplementedException(); }
public bool DeleteCustomer(Customer customer) { return db.CustomerList.Remove(customer); }
public Customer UpdateCustomer(Customer customer) { throw new NotImplementedException(); }
public Customer CreateCustomer(Customer customer) { db.CustomerList.Add(customer); return customer; }
public Customer UpdateCustomer(Customer customer) { var old = db.CustomerList.Single(x => x.CustomerId == customer.CustomerId); db.CustomerList[db.CustomerList.IndexOf(old)] = customer; return customer; }
public List<Reservation> GetAllCustomerReservations(Customer customer) { return db.ReservationList.Where(x => x.CustomerId == customer.CustomerId).ToList(); }
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; }
public bool CreateCustomer(Customer customer) { db.CustomerList.Add(customer); return true; }