I used to use 2x12's for garage shelving. As long as you brace it appropriately, it's fine.
If you're gonna load it heavily, use a brace every couple of feet. If you're gonna load it lightly, a brace every 4 feet should suffice.
The metal "L" brackets are ok for light loads,
100 lb. capacity
but for heavy loads, you'll need something a bit more substantial.
250 lb. capacity
500 lb. capacity