Starting in C# 9, you don't have to explicitly include a Main method in a console application project. Instead, you can use the top-level statements feature to minimize the code you have to write. In this case, the compiler generates a class and Main method entry point for the application.
See Microsoft docs: Top-level statements
BasicConsoleAppdemonstrates a basic top-level console projectBasicUsingInternalClassesAppdemonstrates accessing functionality with classes in the same project.BasicEntityFrameworkCoreAppprovides a simple read from a SQL-Server database using Entity Framework Core- BasicConsoleWithLocalSwitchApp example using switch expression
- WorkingWithDataConsoleApp shows working with
- Class project
DataLibraryto read json data - Class project
ContainerLibrarywith concrete classes used inDataLibrary
- Class project
More code samples to be added shortly.
- .NET Core 5 or higher
- Microsoft Visual Studio 2019 or higher
- Newtonsoft.Json which can be swapped out for System.Json
- SQL-Server Express edition or better