Often I have a bit of code I want to execute from time to time, for example seed the database, drop the database, download some data from the database and collate it in some funny way. All of these tasks can be represented as independent functions in C#.
Ala a console app:
class Program{
static void Task1(){}
static void Task2(){}
static void Main(){
//Task1();
//Task2();
}
}
Here, I comment out the function I don't want to call, and run the function I do want to call. Compile and wait for results.
I'm looking for a way to streamline this process. For example in unit testing you can right click a function and through some magic execute just that function directly from Visual Studio.
Maybe there is an extension that does just this, but I haven't been able to find it. Best way I know of cleaning this so far, is to make snippets in LinqPad. But I feel like I should be able to do this directly from Visual Studio.