Method | Description | |
---|---|---|
GetAllProducts ( ) : List |
Method calls on repository to return a list of all Products from the database.
|
|
GetProductByUPC ( string givenUPC ) : |
Method calls on repository to return a single Product based on UPC code.
|
|
GetProductsByBrand ( string givenBrand ) : List |
Method calls on repository to return a list of Products by Brand.
|
|
ProductService ( IProductRepository productRepository ) : System |
Constructor that requires a repository as a parameter.
|
|
RemoveProduct ( |
Method calls on repository to delete a Product.
|
|
SaveProduct ( |
Method calls on repository to save a Product.
|
public GetProductByUPC ( string givenUPC ) : |
||
givenUPC | string | The UPC used for lookup. |
return |
public GetProductsByBrand ( string givenBrand ) : List |
||
givenBrand | string | Name of the brand for lookup. |
return | List |
public ProductService ( IProductRepository productRepository ) : System | ||
productRepository | IProductRepository | Repository to be used. |
return | System |
public RemoveProduct ( |
||
product | The Product to be deleted. | |
return | void |
public SaveProduct ( |
||
product | The Product to be saved. | |
return | void |