An open API service indexing awesome lists of open source software.

https://github.com/karenpayneoregon/solutions-from-forums

Various code samples for C#
https://github.com/karenpayneoregon/solutions-from-forums

asp-net-core console-application csharp-core ef-core razor-pages sqlserver

Last synced: 3 months ago
JSON representation

Various code samples for C#

Awesome Lists containing this project

README

          

# Code done wrong and how to fix it

This repository is dedicated to a developer just starting out with Visual Studio on how to write decent code. Many samples come from Karen's twenty plus years helping developers asking questions in online developer forums and by in some cases not responding but make note of these cases.

## .NET Core

Currently there are console projects using both .NET Core 6 and .NET Core 7 and the .NET Core 7 projects are using NuGet packages for .NET Core 6.

## Project types

Console and Windows Forms will be dominate project types as they are best to learn from. Why use Windows Forms when there are other project types like MAUI and WPF? Windows Forms when used are glorified console projects in that when performing work a developer can easily see their work and get a better understanding of events, delegates and asynchronous programming.

What about web projects? There will be web projects included from time to time when appropriate.

# Working with databases

All work done with databases will be Microsoft SQL-Server

## Accessing data

Majority of work will be done with Microsoft Entity Framework Core 6 and higher

# Json

Many times `json` will be used either for a quick-n-dirty way to setup data for experimentation along with storing application settings in any project type from console to web.

# NuGet packages

In most cases popular packages will be used along with packages created by Karen Payne.

# Console hello world in color

GreetingsConsoleApp, a console project walks a novice developer through creating a colorful console app with a method to accept a person's name using a [NuGet package](https://www.nuget.org/packages/Spectre.Console/0.45.1-preview.0.28) [Spectre.Console](https://spectreconsole.net/). Instructions are in [HowToCreate.md](GreetingsConsoleApp/HowToCreate.md).

# NotesRazorApp and NotesFormApp

NotesRazorApp is a Razor Page project which provides tips on styling with Bootstrap 5 and working with EF Core 6. NotesFormApp project is for setting up a database for NotesRazorApp project.

See the following [readme](/NotesRazorApp/Article/readme.md) file.