Adult beetles are attracted to lots of foliage, so to deter them it's advised to harvest crops earlier in the year and thoroughly, if possible.
Beetles can be picked off plants with fingers and moved elsewhere.
Planting tomatoes and parsley near asparagus has been shown to minimise infestations from pests.
For bad infestations, introducing beneficial nematodes to the soil has been suggested. It's not recommended to use chemicals because both adults and larvae are valuable food resources to birds and other garden creatures.
Both larvae and adult beetles are predated by birds, chickens, and predatory beetles. Try attracting these into your garden by providing cover (e.g. shrubs, small trees, long grasses). Or, provide perches, feeders and bathing spots for garden birds.