Jeremy Lin had season-ending surgery Friday morning to repair his ruptured patellar tendon, getting a post-op visit from Nets coach Kenny Atkinson and prayers from his teammates.

The Nets had to go out Friday night and take care of business in their home opener against the Magic. They lost their point guard, but couldn’t afford to lose their focus, or suffer a hangover from Lin’s injury.

“You definitely want to talk about not having one, coming out there and acting like nothing happened. But obviously something did happen and all the prayers go out to J-Lin and his family,” D’Angelo Russell told The Post. “But we’ve got business to take care of, so we definitely want to do that also.”

Lin had his procedure performed by Dr. Riley Williams at the Hospital for Special Surgery, and posted a picture of him in his hospital gown with Atkinson on Instagram.

“THANKS for all the love!! Foreal Ive been blown away w the support! The road to recovery starts now…peep the sexy hat lol #doasyoumayLord,” Lin wrote.

Now Atkinson has to figure out how the team will play post-Lin.

“I definitely think we have more depth at the guard position, wing position, overall [than last year],” Atkinson said.

Allen Crabbe moved into the starting lineup at off guard Friday, getting his first Nets start after being brought along slowly. Caris LeVert also is likely to see a bump in minutes.

“We feel terrible for Jeremy, but we’ve got to go out and win basketball games and play as best we can,” LeVert said. “Obviously it sucks to see somebody go down like that, but we’re trying to just go out here play as hard as we can, win games and bounce back.”

The Nets couldn’t play at all without Lin last season, 13-20 when he started and 7-42 when he didn’t. But with LeVert a year older and Russell, Crabbe and DeMarre Carroll added this offseason, they have more options at guard and on the wing.

“I feel like we do. Obviously we have more guards. But it sucks losing somebody like that,” said LeVert, who hasn’t spoken to Atkinson about his role. “My role doesn’t really change. I just go in there play as hard as I can and try to make plays on both ends.”

Lin’s injury also should increase the playing time of Spencer Dinwiddie (the first point guard off the bench). Isaiah Whitehead was inactive the first two games, but he also could work his way back in the rotation.

“Any time you go through war with your brother, whether it be last season, this summer, training camp, all of us have had our bond with Jeremy. To lose a brother, of course it hurts. But we still understand the task ahead and that is to win games,” Dinwiddie said. “Whatever coach decides to do he decides to do. If it results in more minutes, I just have to try to produce and do what’s best for the team.”