Need help with DotNet-ORM-Cookbook?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

Grauenwolf
229 Stars 18 Forks The Unlicense 394 Commits 94 Opened issues

Description

This repository is meant to show how to perform common tasks using C# with variety of ORMs.

Services available

!
?

Need anything else?

Contributors list

# 349,050
C#
c-sharp
.NET
dotnet5
177 commits
# 35,806
.NET
C#
orm-fra...
sqlite-...
33 commits
# 54,096
F#
.NET
injecto...
vulkan
32 commits
# 377,693
C#
HTML
Shell
Webpack
15 commits
# 436,322
C#
HTML
14 commits
# 416,995
entity-...
Firebas...
signalr
entityf...
9 commits
# 109,376
HTML
C#
fulltex...
elastic...
1 commit

The .NET 5 ORM Cookbook

In October of 2016, InfoQ published a series of articles on the repository pattern in .NET. To illustrate the concepts, three ORMs were demonstrated: Entity Framework, Dapper, and Chain.

A criticism of the articles was that it didn't include many people's favorite ORM. So as a follow up, this GitHub repository was created to expand on that idea and create a shared "cookbook" of design patterns for any or all of the .NET ORMs. Contributions are welcome.

With this in mind, we'd like to present The ORM Cookbook

In December of 2019, the ORM Cookbook project was revived with an emphasis on modern, production grade programming. This means that each example must take into consideration these factors:

  • Exception handling
  • .NET Core Support
  • C# 8 Nullable Reference Types
  • Static Code Analysis (e.g. FxCopAnalyzers)

Original InfoQ Articles

Presentation

Each ORM is presented as its own test project. The actual recipes are in the Models and Repositories folder.

To ensure each ORM is "playing by the rules", a shared set of tests will be used. The tests are arranged into "scenario" classes. Each ORM can opt in for a given scenario by inheriting from the appropriate class. This can be done multiple times if the ORM wishes to demonstrate alternate patterns.

Each scenario has a matching markdown file in which the code samples can be added along with any relevant explanations. When possible, use Projbook notation to inline code samples. This will prevent the code samples from getting out of sync with the documentation.

If you build the "Documentation" project, the cookbook will be compiled as a website file.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.