This article is a mirror article of machine translation, please click here to jump to the original article.

View: 1|Reply: 0

[Tips] LINQPad 9 Tutorial on Enabling Web Services (ASP.NET Core).

[Copy link]
Posted on38 seconds ago | | | |
Requirements: Sometimes when using LINQPad 9, we not only write console applications for some tests, but may also need to test some ASP.NET Core features, enable a web service, and listen for HTTP ports.

LINQPad 9 supports creating new ASP.NET Core test code, creating a .linq script, then pressingF4 -> Advanced -> Reference ASP.NET Core, as shown in the figure below:



At the same time, you can use the nuget package to reference Swashbuckle.AspNetCore to display interface documentation in swagger. The code is as follows:
Startup, as shown below:





Previous:.NET/C# Multithreaded task AggregateException exception parsing
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com