C# Класс openTill.Domain.Services.CategoryService

A road map to perform the CRUD operations for a Category object.
Наследование: ICategoryService
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

CategoryService() публичный Метод

Constructor that requires a repository as a parameter.
public CategoryService ( ICategoryRepository categoryRepository ) : System
categoryRepository ICategoryRepository Repository to be used.
Результат System

Delete() публичный Метод

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.
Результат void

GetAll() публичный Метод

Method calls on repository in the DAL to get all Category listing form the database.
public GetAll ( ) : List
Результат List

GetByName() публичный Метод

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.
Результат openTill.Domain.DTO.CategoryDTO

Insert() публичный Метод

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.
Результат void

Update() публичный Метод

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.
Результат void