A court is being asked to determine whether a dairy farmer who distributes raw milk through a "cow share" scheme has breached food safety regulations in South Australia.

Mark Tyler's dairy at Willunga Hill was issued with a compliance order by Biosecurity SA in May.

Sale of raw milk is banned in South Australia but it is not illegal to drink milk from one's own cow.

Mr Tyler has sold shares in his cows and distributes milk to shareholders.

Authorities say the dairy farmer's actions are unlawful because he is not an accredited dairy producer and processor.

Mr Tyler and his wife are facing criminal charges over the scheme but have gone to the District Court seeking to appeal.

The court is considering whether it was reasonable to classify what the Tylers were doing as primary dairy production.

Judge Sydney Tilmouth has reserved his decision.