![]() |
Hagglehaul
1.0
Hagglehaul - book and bid on rides
|
See ITripService. More...
Public Member Functions | |
TripService (IMongoDatabase database) | |
async Task< List< Trip > > | GetAllTripsAsync () |
Gets all trips in the database. Useful for trip discovery. | |
async Task< List< Trip > > | GetRiderTripsAsync (string email) |
Gets all trips which the rider has created. Found through the riderEmail field of the trip. | |
async Task< List< Trip > > | GetDriverTripsAsync (string email) |
Gets all trips which the driver has created. Found through the driverEmail field of the trip. | |
async Task< Trip > | GetTripByIdAsync (string id) |
Gets a trip by its ID. | |
async Task< Trip > | CreateAsync (Trip trip) |
Creates a new trip. | |
async Task | DeleteAsync (string id) |
Deletes a trip by its ID. | |
async Task | UpdateAsync (string id, Trip tripIn) |
Updates a Trip object. | |
Public Attributes | |
readonly IMongoCollection< Trip > | _tripCollection |
See ITripService.
Creates a new trip.
trip | The Trip object to insert. Note that we do not check the object for correctness. |
Implements hagglehaul.Server.Services.ITripService.
async Task hagglehaul.Server.Services.TripService.DeleteAsync | ( | string | id | ) |
Deletes a trip by its ID.
id | The Trip ID to delete. |
Implements hagglehaul.Server.Services.ITripService.
async Task< List< Trip > > hagglehaul.Server.Services.TripService.GetAllTripsAsync | ( | ) |
Gets all trips in the database. Useful for trip discovery.
Implements hagglehaul.Server.Services.ITripService.
async Task< List< Trip > > hagglehaul.Server.Services.TripService.GetDriverTripsAsync | ( | string | ) |
Gets all trips which the driver has created. Found through the driverEmail field of the trip.
The valid email address of the driver. |
Implements hagglehaul.Server.Services.ITripService.
async Task< List< Trip > > hagglehaul.Server.Services.TripService.GetRiderTripsAsync | ( | string | ) |
Gets all trips which the rider has created. Found through the riderEmail field of the trip.
The valid email address of the rider. |
Implements hagglehaul.Server.Services.ITripService.
async Task< Trip > hagglehaul.Server.Services.TripService.GetTripByIdAsync | ( | string | id | ) |
Gets a trip by its ID.
id | The Trip ID of the desired trip. |
Implements hagglehaul.Server.Services.ITripService.
async Task hagglehaul.Server.Services.TripService.UpdateAsync | ( | string | id, |
Trip | tripIn ) |
Updates a Trip object.
id | The Trip ID to update. |
tripIn | The Trip object to update. Note that we do not check the object for correctness. |
Implements hagglehaul.Server.Services.ITripService.