C# Class Cats.Services.Hub.CommodityService

Inheritance: ICommodityService
Show file Open project: edgecomputing/cats

Public Methods

Method Description
AddCommodity ( Commodity commodity ) : bool
CommodityService ( IUnitOfWork unitOfWork ) : System
DeleteById ( int id ) : bool
DeleteCommodity ( Commodity commodity ) : bool
Dispose ( ) : void
EditCommodity ( Commodity commodity ) : bool
FindBy ( bool>.Expression predicate ) : List
FindById ( int id ) : Commodity
GetAllCommodity ( ) : List
GetAllCommodityForReprot ( ) : List

GetAllCommodityForReport

GetAllCommodityViewModelsByParent ( int parentCommodity ) : List
GetAllParents ( ) : List

Gets all parents.

GetAllSubCommodities ( ) : List

Gets all sub commodities.

GetAllSubCommoditiesByParantId ( int Id ) : List

Gets all sub commodities by parant id.

GetCommodityByName ( string name ) : Commodity

Gets the name of the commodity by.

IsCodeValid ( int CommodityID, string CommodityCode ) : bool

Determines whether [commodity code is valid] for [the specified commodity ID].

IsNameValid ( int CommodityID, string Name ) : bool

Determines whether name is valid for the specified commodity ID.

Method Details

AddCommodity() public method

public AddCommodity ( Commodity commodity ) : bool
commodity Cats.Models.Hubs.Commodity
return bool

CommodityService() public method

public CommodityService ( IUnitOfWork unitOfWork ) : System
unitOfWork IUnitOfWork
return System

DeleteById() public method

public DeleteById ( int id ) : bool
id int
return bool

DeleteCommodity() public method

public DeleteCommodity ( Commodity commodity ) : bool
commodity Cats.Models.Hubs.Commodity
return bool

Dispose() public method

public Dispose ( ) : void
return void

EditCommodity() public method

public EditCommodity ( Commodity commodity ) : bool
commodity Cats.Models.Hubs.Commodity
return bool

FindBy() public method

public FindBy ( bool>.Expression predicate ) : List
predicate bool>.Expression
return List

FindById() public method

public FindById ( int id ) : Commodity
id int
return Cats.Models.Hubs.Commodity

GetAllCommodity() public method

public GetAllCommodity ( ) : List
return List

GetAllCommodityForReprot() public method

GetAllCommodityForReport
public GetAllCommodityForReprot ( ) : List
return List

GetAllCommodityViewModelsByParent() public method

public GetAllCommodityViewModelsByParent ( int parentCommodity ) : List
parentCommodity int
return List

GetAllParents() public method

Gets all parents.
public GetAllParents ( ) : List
return List

GetAllSubCommodities() public method

Gets all sub commodities.
public GetAllSubCommodities ( ) : List
return List

GetAllSubCommoditiesByParantId() public method

Gets all sub commodities by parant id.
public GetAllSubCommoditiesByParantId ( int Id ) : List
Id int The id.
return List

GetCommodityByName() public method

Gets the name of the commodity by.
public GetCommodityByName ( string name ) : Commodity
name string The name.
return Cats.Models.Hubs.Commodity

IsCodeValid() public method

Determines whether [commodity code is valid] for [the specified commodity ID].
public IsCodeValid ( int CommodityID, string CommodityCode ) : bool
CommodityID int The commodity ID.
CommodityCode string The commodity code.
return bool

IsNameValid() public method

Determines whether name is valid for the specified commodity ID.
public IsNameValid ( int CommodityID, string Name ) : bool
CommodityID int The commodity ID.
Name string The name.
return bool