i did not try .NET 6 server with linqpad, but just from looking on the screen I can tell, that you will have to rewrite this.
easy part - settings are now in host.config, not web.config
.NET (Core) does not use AppDomain at all.
Also Configuration manager was changed beween .NET Framework and .NET Core.
So probably it would be easier to start from scratch - create new .NET project and try to use ERP DataModel first, then add additional code you need.
(also, just in case, it should be linqpad 7 Using LINQPad with Entity Framework )