The dissipative particle dynamics (DPD) method is used to simulate shear flow between two flat plates. To test this technique, simulations were conducted of both constant and oscillatory shear of a simple fluid. The results of these simulations agree well with theoretical predictions. We subsequently applied our model to study the effect of shear flow on end-tethered polymer layers ("brushes"). When exposed to a constant shear flow, chains in a polymer brush are stretched in the direction of the flow, and the overall layer thickness decreases. This result is similar to what was found in previous simulation studies. However, in the present simulations solvent particles are taken into account explicitly. At low frequencies, the response of a brush to oscillatory shear is qualitatively similar to its response to constant shear. As the flow velocity changes during an oscillation cycle, the polymer chains are able to relax their configurations with respect to the shear rate. At higher frequencies the interpretation of the brush behavior becomes more difficult due to conflicting time scales of the polymer and solvent dynamics in the present DPD model.