The several counties in this state shall have capacity as bodies corporate, to sue and be sued in the manner prescribed by law; to purchase and hold lands; to make such contracts, and to purchase and hold such personal property, as may be necessary to their corporate or administrative powers, and to do all other necessary acts in relation to all the property of the county.