SAN LEANDRO, Calif. — When the mortgage crisis hit more than four years ago and the Northern California economy as a whole went south, one of the first items that consumers cut back on was dining out.

As a result, produce businesses that served that sector of the foodservice industry suffered.

But many have been able to make up for the losses by expanding their institutional foodservice business.

Bay Cities Produce Co. has done just that. The firm has an edge over many other suppliers who offer just whole produce, said Steve Del Masso, vice president.

In addition to a full line of conventional and organic product, Bay Cities Produce also can offer processed and custom-cut items, he said.

The firm has close ties to a food microbiologist and a stainless steel processing facility that is compliant with the U.S. Department of Agriculture, Food and Drug Administration and Hazard Analysis Critical Control Points standards.

Universities use the operation as a teaching facility to show students how things should be done, he said.

“What’s really kept us going is our in-house processing,” Del Masso said.

In the past, when schools issued requests for bids, the winners frequently were companies that submitted the lowest prices.

But Del Masso said that has changed with the U.S. Department of Agriculture’s new school lunch requirements.

“Now they’re very food safety oriented and they have needs for very special, custom-designed salads to meet their nutritional needs,” he said.

“It’s really helped out. Where restaurants have dropped off, schools have come back.”

“Often, the school lunch is the only square meal a child may eat during the day. Exposing him or her to new vegetables and fruits can’t help but benefit the entire produce industry,” Del Masso said.

“The kids come home and finally have tasted a pluot, and the kids are driving most of this,” he said. “It’s introducing them to fruits and vegetables.”

Many hospitals also have changed the way they purchase produce, Del Masso said.

Bay Cities Produce actually lost a large hospital client to a lower-priced bidder.

But the client returned a few months later, and Del Masso said he’d like to think it was because of Bay Cities Produce’s food safety program and custom-cut produce service.

Even with the downturn, the San Francisco Bay Area is still a gourmand’s playground with numerous award-winning restaurants. It’s also the birth place of the farm-to-table ― or locavore ― movement, all of which bode well for Greenleaf Produce, based in the San Francisco Wholesale Produce Market.

“This is one of the most sophisticated food cities in the world,” said Gary Teilmann, a produce buyer.

“In Los Angeles, it’s all about price and not as much about the ‘farm candy.’”

Every day, Greenleaf’s trucks make deliveries to more than 700 accounts in the region.

Not only are many of firm’s customers into higher-end foods, but they also want locally produced product.

In fact, many of the large corporate accounts, such as Google and Apple, demand the produce come from within a 150-mile radius and they request information about the farms, Teilmann said.

Greenleaf prides itself on handling a wide assortment of specialty items. Produce still comprises about 70% of the business, although the company over the years has added complementary dry goods, artisan cheeses, fresh eggs, olive oil and other items to round out truck loads.

Veritable Vegetables, San Francisco, also has benefited from foodservice operators for large companies, such as Facebook and Zynga, increasing purchases of organic produce, said Karen Salinger, co-owner.

The America’s Cup World Series races, held in San Francisco Bay, also boosted demand for organic produce while the sailing event was in town.

“They’re feeding their staff, which ebbs and flows as the race activity ebbs and flows,” she said.