to give some context:
I am going to transition from employee to self-employed as a freelance software engineering consultant.
I am currently working at a client, the performance review was good, and my contract (with my employer) was extended for a year. The projects at the client still require work and I would like to finish them before moving on to prevent unneeded handovers and potential knowledge loss and delays.
The question: How do I professionally go about handing in my resignation at my employer, while simultaneously asking to be allowed to stay working at the client, either directly at the client (the confirmed they would renew my contract as a freelancer) or subcontracting via my current employer?