a very slight bevel/fine sanding to the corners and edges before you start painting will avoid rubbing the paint back to bare board when sanding between coats.a light rub with 240 gt finishing paper will give a better finish that lasts a lot longer
ps if using a water based primer on mdf only give a thin coat and let it dry well.
pps mdf primer is best .
ppps most paint will stick to mdf but primer , 2 x undercoat ,2 x gloss will last well
another reason for purpose made primer is that anything water based risks swelling sawn edges of the board ie the face has its "paper" the edges once cut / sawn will absorb moisture more readily, in much the same way as the end grain of timber
if in doubt a coat of sanding sealer to the edges is usually not a bad idea