public string MyFunction(int n)
{
if (n < = 1) // base case
return 1;//return as soon as possible.
else
return n*fact(n-1);
}?
Instead, put all your secret credentials like User Names and Password in the secret file or Configuration file for none secret credentials.
[Reference]
1. Read the Article Here, it is very helpful to know the tips and tricks.
2. Watch this video of David Fowler and Damian Edwards explaining the Asp.Net Core Architecture. This is important because you would want to know how things work under the hood. https://www.youtube.com/watch?v=Cajo48s2H-E