Yes this would work although incorporating first may make the most sense. It will take you much, much less time to incorporate than it will to patent so why hold off? I only say this because the amount of risk intensifies the longer you wait to incorporate. I invite you to take a look at a few past answers I posted regarding incorporating: When should I incorporate my startup? and How should you structure your startup?
However, If you prefer to patent first, this is straight from the United States Patent and Trademark Office website: Use EPAS to create and submit a Patent Assignment Recordation Coversheet by completing on-line web forms and attaching the supporting legal documentation as black and white TIFF or PDF for submission via the internet. You may email questions about filing electronic patent assignments to EPAS@uspto.gov.