Beverly Hills, California (CNN) President Barack Obama told donors on Thursday in Los Angeles that he told then-incoming President Donald Trump that he should rename Obamacare and take credit for its successes, instead of repealing it.

During a question and answer session at a fundraiser with Democratic National Committee chair Tom Perez, Obama said he didn't have "pride of authorship" over the Affordable Care Act and would have been happy if Trump kept the program but called it something different.

"I said to the incoming president, 'Just change the name and claim that you made these wonderful changes and I would be like, "You go,"'" he said to laughs. "Because I didn't have pride of authorship, I just wanted people to have health care."

Obama then said that Trump "couldn't do it despite controlling all branches of government in Washington. They couldn't do it because we had actually thought it through and it's a hard thing to do."

Trump did not heed Obama's advice and instead looked to dismantle the sweeping health care law, even though he and Republicans on Capitol Hill failed to fully repeal the bill. Obama has even taken to telling audiences that Trump "essentially repealed Obamacare," despite the fact he hasn't. As part of the tax plan passed late last year, Republicans effectively repealed the law's individual mandate , and experts worry its elimination may prompt insurers to drop out and premiums to spike if fewer young and healthy consumers enroll on the exchanges.

Read More