Is there a way to write a console or package manager console while updating the database?
I will describe two options that are available to you out of the box:
1. Console.WriteLineSolution:
(, asp.net), Console.WriteLine, , Console.
, Win32.AllocConsole() Windows API, :
using System.Runtime.InteropServices;
[DllImport("kernel32")]
static extern bool AllocConsole();
:
AllocConsole();
Console.WriteLine("Total number of records left to seed:{0}", total);
, , :
#if DEBUG
#endif
:
AllocConsole , . - , . , GetStdHandle.
2. Debug.Print :
Debug.Print . , , , DEBUG Visual Studio:
→ Windows → → →
, NLog LOG4NET , ?