Category: WebAPI2CLI
-
Zip the whole ASP.NET Core application
I realized that I should have somehow let the user play with the application from his PC. How can I do that,if the application is on some site ? Answer: download the whole site as a zip file. It should be relatively easy for the user– so an endpoint routing should be used – something…
-
Post Mortem -part 7
It was fun to create https://github.com/ignatandrei/webAPI2CLI/ and to deal with various technical problems. It was less fun to make the devops working – however,the previous experiences helped a lot. But even so,waiting to compile the project,making the docs … was not fun. It was cumbersome writing the documentation – however,I know that,without documentation,the project is useless.…
-
Documentation–part 6
I need 2 types of documentation: 1. For let people know how to use 2. For the programmers – to understand what the classes are doing For the first point,documentation to use a. Github has already the readme.md file that shows details for the repository . What I need is something more- i.e. detailed…
-
Devops + CI/CD-part 5
What I need for the devops: 1. Building the solution 2. Running tests 3. Deploying packages to Nuget Being part of the Microsoft stack,it is normal that I have choose for CI / CD the Azure Devops. You can see the AzureDevops at https://dev.azure.com/ignatandrei0674/WebAPI2CLI/_build?definitionId=7&_a=summary and how it is done by reading https://github.com/ignatandrei/WebAPI2CLI/blob/master/azure-pipelines.yml Seeing code coverage…
-
Create and running tests- part 4
I have made a TestWebSite,in .NET Core 3.1,I was also thinking that WebApplicationFactory exists and tutorial like https://docs.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-3.1 it will be easy to test the site. However,I have found the hard way that is not a real server : it does not have the adresses / ports open. Read https://github.com/dotnet/aspnetcore/issues/4892 . So I have made…
-
Implementing–part 3
First implementation was just a bunch a code thrown in an API project. All self contained,all in one WebAPI project. Some problems that I have faced: 1. The class that executes( the hosted service ) should have access to the address of the server . However,the class is injected at the moment of creating…
-
Thinking of the project–part 2
The questions that I have to solve is : 1. How to run something in an ASP.NET Core project,when we have just WEBAPI controllers ? The answer was pretty simple: Hosted Services: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/hosted-services?view=aspnetcore-3.1&tabs=visual-studio . It runs unattended and can be started by the project 2. Which version of .NET Core should I use ? Another…
-
New side project- WebAPI To CLI–part 1
I have had an idea; What if the WebAPI application can be called from the console application itself ? This will permit just having the DI running – and all the stuff that WebAPI can work with when calling a controller. Will be good in a CI / CD workflow – testing the full API…