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