Hagglehaul  1.0
Hagglehaul - book and bid on rides
Loading...
Searching...
No Matches
hagglehaul.Server.Services.BidService Class Reference

See IBidService. More...

Inheritance diagram for hagglehaul.Server.Services.BidService:
hagglehaul.Server.Services.IBidService

Public Member Functions

 BidService (IMongoDatabase database)
 
async Task< List< Bid > > GetDriverBidsAsync (string email)
 Get all bids for a driver.
 
async Task< List< Bid > > GetTripBidsAsync (string tripId)
 Get all bids for a trip.
 
async Task< BidCreateAsync (Bid bid)
 Create a new bid on a trip.
 
async Task UpdateAsync (string id, Bid bidIn)
 Update a bid.
 
async Task DeleteAsync (string id)
 Delete a bid.
 
async Task DeleteByTripIdAsync (string tripId)
 Delete all bids for a given trip. Useful when a trip is deleted.
 

Public Attributes

readonly IMongoCollection< Bid_bidCollection
 

Detailed Description

See IBidService.

Member Function Documentation

◆ CreateAsync()

async Task< Bid > hagglehaul.Server.Services.BidService.CreateAsync ( Bid bid)

Create a new bid on a trip.

Parameters
bidA Bid object to be inserted. Note that we do not check for correctness of the inserted object.
Returns

Implements hagglehaul.Server.Services.IBidService.

◆ DeleteAsync()

async Task hagglehaul.Server.Services.BidService.DeleteAsync ( string id)

Delete a bid.

Parameters
idThe Bid ID of the bid
Returns

Implements hagglehaul.Server.Services.IBidService.

◆ DeleteByTripIdAsync()

async Task hagglehaul.Server.Services.BidService.DeleteByTripIdAsync ( string tripId)

Delete all bids for a given trip. Useful when a trip is deleted.

Parameters
tripIdThe Trip ID for which all bids will be deleted.
Returns

Implements hagglehaul.Server.Services.IBidService.

◆ GetDriverBidsAsync()

async Task< List< Bid > > hagglehaul.Server.Services.BidService.GetDriverBidsAsync ( string email)

Get all bids for a driver.

Parameters
emailThe email (username) of the driver
Returns
A List<T> of Bid objects

Implements hagglehaul.Server.Services.IBidService.

◆ GetTripBidsAsync()

async Task< List< Bid > > hagglehaul.Server.Services.BidService.GetTripBidsAsync ( string tripId)

Get all bids for a trip.

Parameters
tripIdThe Trip ID of the trip
Returns
A List<T> of Bid objects

Implements hagglehaul.Server.Services.IBidService.

◆ UpdateAsync()

async Task hagglehaul.Server.Services.BidService.UpdateAsync ( string id,
Bid bidIn )

Update a bid.

Parameters
idThe Bid ID of the bid
bidInThe new Bid object. Note that we do not check for correctness of the inserted object.
Returns

Implements hagglehaul.Server.Services.IBidService.


The documentation for this class was generated from the following file: