C# Class openTill.Domain.Services.BrandService

A road map to perform the CRUD operations for a brand object
Inheritance: IBrandService
Mostra file Open project: CIT275DevGroup/openTill Class Usage Examples

Public Methods

Method Description
BrandService ( IBrandRepository brandRepository ) : System

Constructor that requires a repository as a parameter.

Delete ( Brand givenBrand ) : void

Method calls on repository to delete an existing brand in the database.

GetAllBrands ( ) : List

Method calls on repository to return a list of all Brands in the database

Insert ( BrandDTO givenBrand ) : void

Method calls on repository to insert a new brand into the database.

Update ( BrandDTO givenBrand ) : void

Method calls on repository to update an existing Brand in the database.

Method Details

BrandService() public method

Constructor that requires a repository as a parameter.
public BrandService ( IBrandRepository brandRepository ) : System
brandRepository IBrandRepository Repository to be used.
return System

Delete() public method

Method calls on repository to delete an existing brand in the database.
public Delete ( Brand givenBrand ) : void
givenBrand Brand Name of the brand to be deleted.
return void

GetAllBrands() public method

Method calls on repository to return a list of all Brands in the database
public GetAllBrands ( ) : List
return List

Insert() public method

Method calls on repository to insert a new brand into the database.
public Insert ( BrandDTO givenBrand ) : void
givenBrand openTill.Domain.DTO.BrandDTO Brand Data Transfer Object to be inserted into the database.
return void

Update() public method

Method calls on repository to update an existing Brand in the database.
public Update ( BrandDTO givenBrand ) : void
givenBrand openTill.Domain.DTO.BrandDTO Brand Data Transfer Object to the updated in the database.
return void