C# Class openTill.Domain.Services.CategoryService

A road map to perform the CRUD operations for a Category object.
Inheritance: ICategoryService
Afficher le fichier Open project: CIT275DevGroup/openTill Class Usage Examples

Méthodes publiques

Méthode Description
CategoryService ( ICategoryRepository categoryRepository ) : System

Constructor that requires a repository as a parameter.

Delete ( CategoryDTO categoryToDelete ) : void

Method calls on repository to remove a Category field from the database.

GetAll ( ) : List

Method calls on repository in the DAL to get all Category listing form the database.

GetByName ( string categoryName ) : CategoryDTO

Method calls on repository for a specific category from the database based on name.

Insert ( CategoryDTO categoryToInsert ) : void

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

Update ( CategoryDTO categoryToUpdate ) : void

Method calls on repository to update an exisiting field in the database.

Method Details

CategoryService() public méthode

Constructor that requires a repository as a parameter.
public CategoryService ( ICategoryRepository categoryRepository ) : System
categoryRepository ICategoryRepository Repository to be used.
Résultat System

Delete() public méthode

Method calls on repository to remove a Category field from the database.
public Delete ( CategoryDTO categoryToDelete ) : void
categoryToDelete openTill.Domain.DTO.CategoryDTO Category that is to be removed from the database.
Résultat void

GetAll() public méthode

Method calls on repository in the DAL to get all Category listing form the database.
public GetAll ( ) : List
Résultat List

GetByName() public méthode

Method calls on repository for a specific category from the database based on name.
public GetByName ( string categoryName ) : CategoryDTO
categoryName string The name of the category to retrieve.
Résultat openTill.Domain.DTO.CategoryDTO

Insert() public méthode

Method calls on repository to insert a new category field into the database.
public Insert ( CategoryDTO categoryToInsert ) : void
categoryToInsert openTill.Domain.DTO.CategoryDTO Category Data Transfer Object to insert into the database.
Résultat void

Update() public méthode

Method calls on repository to update an exisiting field in the database.
public Update ( CategoryDTO categoryToUpdate ) : void
categoryToUpdate openTill.Domain.DTO.CategoryDTO Category that is to be updated.
Résultat void