A Csharp console application which converts *.csv
data into structs to perform ER queries.
-
History: Way back before Win10 I made an social
C#
rosary app which depended heavily on ADO, a WPF GUI, and multiple networked client computers united by a networked host server.- Predecessor project: rosary.net, Wiki
-
Revisit: In 2021, I revisited the project and made a minimal single user stanalone TTY version.
- Exercise objective: Instead of ADO/MySql, Tables, and Dictionaries... I just just use a Class/Struct ER database populated with
*.csv
data. The*.csv
files are taken from printf-time.git - Having not touched
C#
in a while, this was a refresher review project.
- Exercise objective: Instead of ADO/MySql, Tables, and Dictionaries... I just just use a Class/Struct ER database populated with
Debian
## rm previous builds and initialize with *.txt script *.cs
## .NET for Debian will also be installed if needed
## https://docs.microsoft.com/en-us/dotnet/core/install/linux-debian
./dotnet-new-console-debian.sh
## Run project
dotnet run
Win10
:: rem previous builds and initialize with *.txt script *.cs
.\dotnet-new-console-win10.bat
:: Run project
dotnet run
*.csv
files are;
delineated instead of,
- Csv header format ERClassName.ERClassAttribute
- Example:
"bead.beadID";"bead.beadType" 0;"my bead type string"
- Example:
Assumes CSV files are stored in .\database\csv\*.csv
- Change
MyFunctions.CsvFilePath( csvBaseName )
instructions or omit it's usage to import an external ER class.- Manual definition example:
// base file name string csvBaseName = "myCsvFile.csv"; ERClass.Bead.csvBaseName = csvBaseName; // Default string path = MyFunctions.CsvFilePath( csvBaseName ); // @".\database\csv\myCsvFile.csv" ERClass.Bead.path = path; // Alternate (N/A) string path = @"C:\database\myCsvFile.csv"; // Custom path location ERClass.Bead.path = path;
- Manual definition example:
Guidance: Install the .NET SDK or the .NET Runtime on Debian
## DL *.deb
wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
## install .Net
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-5.0
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y dotnet-runtime-5.0
.NET is a free, cross-platform, open-source developer platform for building many different types of applications.
.NET 5.0 (recommended) x64 | .NET 5.0 (recommended) x86 |
---|---|
dotnet-sdk-5.0.202-win-x64.exe | dotnet-sdk-5.0.202-win-x86.exe |
windowsdesktop-runtime-5.0.5-win-x64.exe | windowsdesktop-runtime-5.0.5-win-x86.exe |
.NET Core is a free, cross-platform, open-source developer platform for building many different types of applications.
.NET Core 3.1 (LTS) x64 | .NET Core 3.1 (LTS) x86 |
---|---|
dotnet-sdk-3.1.408-win-x64.exe | dotnet-sdk-3.1.408-win-x86.exe |
windowsdesktop-runtime-3.1.14-win-x64.exe | windowsdesktop-runtime-3.1.14-win-x86.exe |
## build and package within the project home directory
dotnet publish --output "./" --runtime win-x64 --configuration Release -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true
## https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp
code --list-extensions
code --install-extension ms-dotnettools.csharp
#code --uninstall-extension ms-dotnettools.csharp
-
VSCodium Plugin (alternative)
Non-MS Version: https://github.com/muhammadsammy/free-omnisharp-vscode