WebApplication usage in LinqPad
I am having trouble using the new C# template in LinqPad. The template starts with var builder = WebApplication.CreateBuilder(args);
, which doesn't seem to work in LinqPad.
Here is my .csproj for reference:
<Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFramework>net7.0</TargetFramework> <Nullable>enable</Nullable> <ImplicitUsings>enable</ImplicitUsings> </PropertyGroup> </Project>
I would appreciate guidance on how to overcome this issue.
Thank you in advance for your assistance.
Comments
Press Ctrl+F1 to bring up the LINQPad tutorial and reference, and search for ASP.NET. This will give you a couple of examples of how to use ASP.NET minimal API with LINQPad.
Thanks, I see that the trick is simply checking the
Reference ASP.NET Core
inQuery Properties
.