My pal has been working on a WinForms application for a couple of years, making continuous improvements and adding modules and features into it. He recently approached me with a problem. He wanted to introduce some middleware into his application and make it scale, but still perform very well. He was interested in WebApi and did not want to destroy his years of investment in developing a completely new application. His latest application has been using EntityFramework code first, that made it simpler for me to suggest a solution. He had written his application with no clear separation of concerns in VB.NET. He wanted the application to have the following structure.