Nicolas D'Agosto, who plays Virginia Johnson's (Lizzy Caplan) new lover in Masters of Sex, is set to star in the How I Met Your Mother spinoff, How I Met Your Dad.

Bill Masters' Baby Gets a Nanny; New Character Introduced?

In Masters of Sex D'Agosto plays Dr. Ethan Haas, the most recent guy to walk into Virginia's life and take over as father figure to her two kids. Haas' character was also romantically involved with a nurse at the hospital and Masters' wife.

The 33-year-old actor will be playing an IT guy who falls for Greta Gerwig's character, Sally, on How I Met Your Dad

It seems unlikely that D'Agosto will be dropping his role on Masters of Sex for the new gig. He is expected to continue with his recurring part in the Showtime series. Now that Haas is romantically linked to Virginia he will be indispensable for a while.

Michael Sheen Talks About Intimacy and What Makes Bill So Emotionally Unavailable

It was also revealed that Anders Holm (Workaholics) will be playing Gavin, Sally's ex-husband on the show and Andrew Santino will be playing her older brother, who is also a lawyer.

Allison Janney recently confirmed that she would be continuing her role as Margaret Scully in the second season of Masters of Sex to Digital Spy. Scully is in a sexless marriage with Provost Barton Scully, who is revealed as being homosexual in the second half of the first season. Janney suggested that the producers were trying to work out the filming schedule for the next season right now. When asked about her character arc and how things might play out for Margaret in the second season, Janney was unsure about the details.

"I don't know how many episodes, 'cos I don't know what can happen with Margaret Scully at this point," she said. "But I know it was a great storyline to get to play and I'm sure that they're going to want to tie that off somehow."

Watch D'Agosto talk about his part in Masters of Sex: