C# 클래스 openTill.Domain.Services.CategoryService

A road map to perform the CRUD operations for a Category object.
상속: ICategoryService
파일 보기 프로젝트 열기: CIT275DevGroup/openTill 1 사용 예제들

공개 메소드들

메소드 설명
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