Example #1
0
 public IEnumerable <ProductTypeView> FindByName(string name)
 {
     return(_unitOfWork.ProductTypeRepository
            .GetAll()
            .Where(type => type.Name.Contains(name))
            .Select(obj => ProductTypeMapper.ToViewEntity(obj)));
 }
Example #2
0
 public ProductTypeView GetProductTypeByID(int productTypeId)
 {
     return(ProductTypeMapper.ToViewEntity(_unitOfWork.ProductTypeRepository.GetById(productTypeId)));
 }
Example #3
0
 public IEnumerable <ProductTypeView> GetAllProductTypes()
 {
     return(_unitOfWork.ProductTypeRepository
            .GetAll()
            .Select(obj => ProductTypeMapper.ToViewEntity(obj)));
 }