PI06 i PI06-1. Docker definitions for MSSQL and Postgres. Data seeder/generator for countries and people. Entity Framework example with variants for Postgres and MSSQL
This commit is contained in:
21
DataAccess/EF_Demo/Util.cs
Normal file
21
DataAccess/EF_Demo/Util.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace EF_Demo;
|
||||
|
||||
public static class Util
|
||||
{
|
||||
public static void EnterToContinue(bool clearConsole = true)
|
||||
{
|
||||
Console.WriteLine("ENTER to continue");
|
||||
Console.ReadLine();
|
||||
if (clearConsole)
|
||||
{
|
||||
Console.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
public static int ReadNumber()
|
||||
{
|
||||
int number;
|
||||
while (!int.TryParse(Console.ReadLine(), out number)) ;
|
||||
return number;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user