C# Класс openTill.Persistence.ProductRepository

A class that actually perform the CRUD operations of a Product.
Наследование: IProductRepository
Показать файл Открыть проект Примеры использования класса

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

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