{"id":22065688,"url":"https://github.com/karenpayneoregon/top-level-csharp","last_synced_at":"2026-05-09T00:38:59.012Z","repository":{"id":110840684,"uuid":"383641297","full_name":"karenpayneoregon/top-level-csharp","owner":"karenpayneoregon","description":"top-level feature for C#9","archived":false,"fork":false,"pushed_at":"2021-07-07T16:16:18.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T00:29:13.216Z","etag":null,"topics":["csharp","csharp9","toplevel"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karenpayneoregon.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-07T01:33:37.000Z","updated_at":"2022-07-21T19:35:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"60445a64-e219-45b0-8138-8580ae26e4f4","html_url":"https://github.com/karenpayneoregon/top-level-csharp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2Ftop-level-csharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2Ftop-level-csharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2Ftop-level-csharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2Ftop-level-csharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karenpayneoregon","download_url":"https://codeload.github.com/karenpayneoregon/top-level-csharp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245144978,"owners_count":20568056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","csharp9","toplevel"],"created_at":"2024-11-30T19:21:20.246Z","updated_at":"2026-05-09T00:38:58.985Z","avatar_url":"https://github.com/karenpayneoregon.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\nStarting 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.\n\n**See** Microsoft docs: [Top-level statements](https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/program-structure/top-level-statements)\n\n# Included projects\n\n- `BasicConsoleApp` demonstrates a basic top-level console project\n- `BasicUsingInternalClassesApp` demonstrates accessing functionality with classes in the same project.\n- `BasicEntityFrameworkCoreApp` provides a simple read from a SQL-Server database using [Entity Framework Core](https://docs.microsoft.com/en-us/ef/core/)\n- BasicConsoleWithLocalSwitchApp example using [switch expression](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/switch-expression)\n- WorkingWithDataConsoleApp shows working with\n  - Class project `DataLibrary` to read json data\n  - Class project `ContainerLibrary` with concrete classes used in `DataLibrary`\n\nMore code samples to be added shortly. \n\n# Requires\n\n- [.NET Core](https://dotnet.microsoft.com/download) 5 or higher\n- [Microsoft Visual Studio](https://visualstudio.microsoft.com/) 2019 or higher\n- Newtonsoft.Json which can be swapped out for [System.Json](https://docs.microsoft.com/en-us/dotnet/standard/serialization/system-text-json-how-to?pivots=dotnet-5-0)\n- [SQL-Server](https://www.microsoft.com/en-us/sql-server/sql-server-downloads) Express edition or better ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarenpayneoregon%2Ftop-level-csharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarenpayneoregon%2Ftop-level-csharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarenpayneoregon%2Ftop-level-csharp/lists"}