C# 클래스 openTill.Persistence.ProductRepository

A class that actually perform the CRUD operations of a Product.
상속: IProductRepository
파일 보기 프로젝트 열기: CIT275DevGroup/openTill 1 사용 예제들

공개 메소드들

메소드 설명
Delete ( ProductDTO productDel ) : void

Deletes a product.

GetAll ( ) : IEnumerable

Returns all products.

GetByBrand ( string brand ) : IEnumerable

Returns all products that match the given brand.

GetByUPC ( string upc ) : ProductDTO

Returns a product matching the given upc. If no matching product is found an empty product is returned.

Insert ( ProductDTO newProduct ) : void

Submits a new product for persistence.

Update ( ProductDTO productUpdate ) : void

Updates an existing product.

메소드 상세

Delete() 공개 메소드

Deletes a product.
public Delete ( ProductDTO productDel ) : void
productDel openTill.Domain.DTO.ProductDTO Product to delete
리턴 void

GetAll() 공개 메소드

Returns all products.
public GetAll ( ) : IEnumerable
리턴 IEnumerable

GetByBrand() 공개 메소드

Returns all products that match the given brand.
public GetByBrand ( string brand ) : IEnumerable
brand string String product brand
리턴 IEnumerable

GetByUPC() 공개 메소드

Returns a product matching the given upc. If no matching product is found an empty product is returned.
public GetByUPC ( string upc ) : ProductDTO
upc string String product upc
리턴 openTill.Domain.DTO.ProductDTO

Insert() 공개 메소드

Submits a new product for persistence.
public Insert ( ProductDTO newProduct ) : void
newProduct openTill.Domain.DTO.ProductDTO New product to save
리턴 void

Update() 공개 메소드

Updates an existing product.
public Update ( ProductDTO productUpdate ) : void
productUpdate openTill.Domain.DTO.ProductDTO Product to update
리턴 void