Category: webApi

  • What I should return from WebAPI ?

      There are several approaches when returning code from WebAPI .  Let’s frame the problem: say we have a Person controller with 2 actions: – a GET {id}  – that retrieves the Person with id – a POST {Peron}  – that tries to verify the validity of the Person and then saves to database. We…

  • 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…

  • Modifying from MVC to WebAPI

    I have to make a private personal site to work with Android  / IPhone /Windows Phone natively. So I have to open the data from the site. But what is better then http://en.wikipedia.org/wiki/Eating_your_own_dog_food ? So I decide to do modifications for this The site was a simple listing of steps to solve a dangerous situation…