Platy.AdventureWorks.Repository
0.1.4
dotnet add package Platy.AdventureWorks.Repository --version 0.1.4
NuGet\Install-Package Platy.AdventureWorks.Repository -Version 0.1.4
<PackageReference Include="Platy.AdventureWorks.Repository" Version="0.1.4" />
<PackageVersion Include="Platy.AdventureWorks.Repository" Version="0.1.4" />
<PackageReference Include="Platy.AdventureWorks.Repository" />
paket add Platy.AdventureWorks.Repository --version 0.1.4
#r "nuget: Platy.AdventureWorks.Repository, 0.1.4"
#:package Platy.AdventureWorks.Repository@0.1.4
#addin nuget:?package=Platy.AdventureWorks.Repository&version=0.1.4
#tool nuget:?package=Platy.AdventureWorks.Repository&version=0.1.4
Overview
A project template that I use to quickly create a set of repository classes for interacting with any existing database.
Features
- The DbContext class is internal, which means that external libraries users cannot make db changes without interacting with the repository classes.
- The repository classes validate the entities before making changes to the database keeping it clean.
- A Result type is returned in case of success or failure, instead of relying on exceptions. Makes testing and validation easier.
- A notification is published for every Create, Update and Delete event. External libraries can subscribe to these events and accordingly perform any required action.
csxtemplates to customize the entities,the repository classes and the model classes that are output by the generator.- Integration tests using TestContainers helps testing the repository classes with a real database that is spun up and down as the tests execute.
Build solution
First, initialize the submodules using git submodule update --init.
Build the solution - Platy.AdventureWorks.Repository.sln.
Open the solution - EntityFrameworkCore.Generator/EntityFrameworkCore.Generator.sln and build it.
This is one of the submodules downloaded.
Execute the command ..\..\efg\EntityFrameworkCore.Generator.exe generate -f .\entity-generation.yml from the directory of Platy.AdventureWorks.Repository.csproj.
This generates the domain files. Make sure the AdventureWorks database is available.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- Ardalis.GuardClauses (>= 5.0.0)
- Ardalis.Result (>= 10.1.0)
- Ardalis.Result.FluentValidation (>= 10.1.0)
- AutoMapper (>= 14.0.0)
- Azure.Identity (>= 1.13.1)
- FluentValidation (>= 11.11.0)
- MediatR (>= 12.5.0)
- Microsoft.EntityFrameworkCore.Design (>= 9.0.2)
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.2)
- Microsoft.EntityFrameworkCore.SqlServer (>= 9.0.2)
- Microsoft.EntityFrameworkCore.Tools (>= 9.0.2)
- Microsoft.Extensions.Logging (>= 9.0.2)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.6)
- NetTopologySuite (>= 2.6.0)
- Platy.Shared (>= 0.1.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
* Net9