- Overview
- Usability
- System Requirements
- Installation Using Makefiles
- Database, WebMVC, and WebAPI
- Advanced Structures, Methods, and Classes
- Intermediate
- Basic Functions
The dotnet-core-examples repository contains samples that you can use to test various aspects of
NET Core | ASP Net Core. Each section (folder)
contains one or more applications that should run on any number of operating
systems, each having their own Makefile
to facilitate: clean
, pack
,
install
and uninstall
. Most applications can run with a simple command: dotnet run
. All the samples have been tested as .Net Global Tools.
The code for each application is Verbose, meaning, shortcuts and advanced concatenations have been kept to a minimum to allow for easier readability. Code comments are also brief, but should suffice for most readers.
The majority of the programs are a single file (Program.cs)
, easy to use,
and can be compiled on any operating system capable of running
.Net Core SDK.
All of the examples are layed out in sections (Folder Hierarchy)
.
While the Database, WebMVC, and WebAPI
sections are not listed as Advanced,
the examples represent many challenging aspects of OOP including Dependency Injection
, Models
, Controllers
, Views
, and Database Integration
.
At the time of this writing, all example applications were tested on:
- Window-10 build 17134 x86_64
- Windows Subsystem Linux (WSL)
- Linux Native Ubuntu 18.04
- If the .Net Core SDK can run on a particular system, so should the examples.
- Supported Operating Systems:
Windows
,Linux
,MacOS
- Net Core SDK v2.2+
- VS Code Editor is optional but preferred
- Dual Core CPU Minimum
- At Least 1GB RAM
- 1 to 2 GB of Free disk space (if running all apps, less if not)
NOTE: All tools in this repository have been updated with
Makefiles
that support installing each application as a .Net Global Tool. This allows for global access to the application from anywhere within the user space. File install locations are as follows:
# Windows
C:\Users\%username%\.dotnet\tools
# Linux | MacOS
/home/$USER/.dotnet/tools
Each application has its own Makefile
with the commands to build, install,
uninstall and run the application except where noted. For Windows, the file name is
make.cmd
. For Linux, the file name is Makefile
without extension. In both
cases, the invocation command is the same: make <target>
.
# Install: In the directory you want to test, type the following:
# Windows
make clean
make pack
make install
# Linux | MacOSX
make
make install
# After install, type the name of the package you installed to execute it.
# Example: To start LBService, type:
LBService
# Upon successful installation, the appropriate application name will be
# displayed with instructions to run it.
# Uninstall: Windows, Linux and MacOS
make uninstall
Database, WebMVC, WebAPI
provides examples relating to various database
servers, web technologies, and Application Programming Interfaces (API's). As to their
classification, the examples fall into Advanced category. Setting up the Database
properly, and ensuring the Usernames and Passwords
match is key to a successful launch.
These database applications are functional for their intended purpose, e.g. Testing
. However, none should be considered fully production worthy.
Application | Database | DB Setup | Status | Description |
---|---|---|---|---|
RedisLeaderboard | Redis | See Docs | Stable | Ham Radio Contest Leaderboard Example |
The following applications are in various states of development, anywhere from Database Design to final API/MVC integration. The projects may reside in the repository, but should not be considered functional. As they move from development to testing, will move up to Stable for Testing Purposes
Application | Database | DB Setup | Status | Description |
---|---|---|---|---|
RDaaS-Data | PostgreSQL | See Docs | Testing | Database backend for the RDaaS project |
RDaaS-API | PostgreSQL | TBD | Devel | Swagger RESt-API for Radio Related Data |
RDaaS-MVC | PostgreSQL | TBD | Devel | Razor WebMVC for Admin Access to RDaaS |
WSJTX-Data-API | MongoDB | TBD | Devel | Document DB for storing WSJT-X Decode Data |
WSJTX-Data-MVC | MongoDB | TBD | Devel | Angular WebMVC for WSJT-X Data |
Rural-Fire-API | SQL-Server | TBD | Devel | Swagger RESt-API for County Rural Fire Management |
Rural-Fire-MVC | SQL-Server | TBD | Devel | Razor WebMVC for County Rural Fire Management |
WslNeo4J | Neo4J | TDB | Devel | Movie DB queries using Console App and Neo4j |
Advanced
applications are a combination of both Basic
and Intermediate functions. They may also use instantiation
of classes, interfaces, abstracts, or more advanced
Object Oriented Programming (OOP)
techniques.
Application | Type | Description |
---|---|---|
EmployeeCommissionV1 | various | Calculate commission for one or more employee's |
EmployeeCommissionV2 | various | Uses: Struct, Array of Struct, if-else, loops and methods |
TikTakToe | various | Game: uses 2D Arrays, if-else, loops, methods, and colors |
Intermediate
employs things such as structures,
and methods
outside of the main method
or (Program.cs
) file.
Application | Type | Description |
---|---|---|
AreaOfCircle | methods | Use methods to calc the Area of a Circle |
AreaOfTriangle | methods | Use methods to calc the Area of a Triangle |
CalculatePay | methods | Use methods to calculate Gross Pay |
InchesToCentimeters | methods | Use methods to Convert In. to Cn. |
VolumeOfCylinder | methods | Use methods to calc the Volume of a Cylinder |
JobListing | struct | Use struct to generate job postings |
MSLListing | struct | Use struct to add to listings array and MLS IDs |
RandGen | struct | Advanced Password generator with user input options |
Basic Functions
employ things such as Arrays,
for-loops,
while-loops,
and if-else
statements. All functions are contained within the standard (Program.cs)
file. Typically, no other classes are involved apart basic from
using statements.
Application | Type | Description |
---|---|---|
ComputeArray | Array | Compute average using an array. |
SimpleArray | Array | Sum 10 entries from user |
TargetValue | Array | Find target value in array |
DoubleTriangle | for-loop | Print a diamond using loops |
RightTriangle | for-loop | Print Right-Triangle using loops |
RocketLaunch | for-loop | Simple count-down counter |
SingleTree | for-loop | Prints a tree using loops |
StackDifferent | for-loop | Stack Different Numbers Across |
StackSame | for-loop | Stack Same Numbers Across |
BasicMath | if-else | Sum, Difference, Quotient, Product, and Average |
CorrectChange | if-else | Use Modulus to calculate correct change |
EndsWell | if-else | Determine the suffix, for a given integer (1-100) |
EndsWellExtend | if-else | Determine the suffix, for a given integer (1-1000) |
FeetToYards | if-else | User Input feet => convert to yards |
GradeDetermination | if-else | Determine letter grade from three input values |
LeaguesToNm | if-else | User Input Leagues => convert to Nautical Miles |
MiddleValue | if-else | Determine the middle value of three integers |
MilesPerTank | if-else | Calculate Miles per Tank of Fuel |
NetPayCalc | if-else | Calculate Net Pay by taking out fixed tax rates |
PerfectFit | if-else | Determine various apsects of Squares and Rectangles |
PositiveDifference | if-else | Determine the Absolute Value (Positive Difference) |
SaintIves | if-else | Simple compounding math statements |
SmallestOfFive | if-else | Determine the smallest of five numbers |
AccountBalancer | while-loops | While loop Account Balancer |
AverageNumbers | while-loops | Average a series of Even and Odd numbers |
Cubed | while-loops | calculate cubed values |
Happy | while-loops | While (true) loop |
HighLowRedux | while-loops | Simple High-Low Game |
IncrementBy | while-loops | Loop that increments by x |
LargestNumber | while-loops | Loop entry, print largest number |
PaymentPlan | while-loops | Loop payment plan comparison, no user input |
PowerOff | while-loops | Loop that calculates powers of 10 for x < <= 10 |