Skip to content

Commit 1793365

Browse files
committed
update readme files, add workflow file
1 parent 1f5503b commit 1793365

File tree

6 files changed

+67
-6
lines changed

6 files changed

+67
-6
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This workflow will build a .NET project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3+
4+
name: .NET Build & Test
5+
6+
on:
7+
push:
8+
branches: [ "master" ]
9+
pull_request:
10+
branches: [ "master" ]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Setup .NET
18+
uses: actions/setup-dotnet@v4
19+
with:
20+
dotnet-version: 8.0.x
21+
- name: Restore dependencies
22+
run: dotnet restore
23+
- name: Build
24+
run: dotnet build --no-restore
25+
- name: Test
26+
run: dotnet test --no-build --verbosity normal --filter "Category!=Integration"
27+

EasyReasy.Database.Npgsql/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@
22

33
# EasyReasy.Database.Npgsql
44

5+
[![NuGet](https://img.shields.io/nuget/v/EasyReasy.Database.Npgsql.svg)](https://www.nuget.org/packages/EasyReasy.Database.Npgsql/)
6+
57
PostgreSQL-specific implementation of `IDataSourceFactory` for creating Npgsql data sources.
68

9+
## Installation
10+
11+
```bash
12+
dotnet add package EasyReasy.Database.Npgsql
13+
```
14+
715
## NpgsqlDataSourceFactory
816

917
`NpgsqlDataSourceFactory` implements `IDataSourceFactory` and creates configured Npgsql data sources from connection strings.

EasyReasy.Database.Sqlite/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@
22

33
# EasyReasy.Database.Sqlite
44

5+
[![NuGet](https://img.shields.io/nuget/v/EasyReasy.Database.Sqlite.svg)](https://www.nuget.org/packages/EasyReasy.Database.Sqlite/)
6+
57
SQLite-specific implementation of `IDataSourceFactory` for creating SQLite data sources.
68

9+
## Installation
10+
11+
```bash
12+
dotnet add package EasyReasy.Database.Sqlite
13+
```
14+
715
## SqliteDataSourceFactory
816

917
`SqliteDataSourceFactory` implements `IDataSourceFactory` and creates SQLite data sources from connection strings.

EasyReasy.Database.Testing/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@
22

33
# EasyReasy.Database.Testing
44

5+
[![NuGet](https://img.shields.io/nuget/v/EasyReasy.Database.Testing.svg)](https://www.nuget.org/packages/EasyReasy.Database.Testing/)
6+
57
Utilities for testing code that uses the EasyReasy.Database library.
68

9+
## Installation
10+
11+
```bash
12+
dotnet add package EasyReasy.Database.Testing
13+
```
14+
715
## For Service Tests (Unit Tests)
816

917
Use `FakeDbSession` and `FakeDbSessionFactory` when unit testing services. Mock repositories and verify transaction behavior without a real database.

EasyReasy.Database/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
# EasyReasy.Database
44

5+
[![NuGet](https://img.shields.io/nuget/v/EasyReasy.Database.svg)](https://www.nuget.org/packages/EasyReasy.Database/)
6+
57
> **Note**: Some examples in this guide use Dapper (e.g., `QueryAsync`, `QuerySingleOrDefaultAsync`) for query execution, but Dapper is **not a dependency** of this library. This library is database-agnostic and works with any ADO.NET-compatible database provider and any query library you choose to use.
68
79
This file provides an overview of how EasyReasy.Database can be use from two points of view: service developers and repository developers.
@@ -10,6 +12,12 @@ If you are thinking about writing a repository class you might want to jump to t
1012

1113
If you already have a repository and you are thinking about writing a service that uses it you can read in the section about [using repositories](#for-service-developers-using-repositories). That's the section just below here.
1214

15+
## Installation
16+
17+
```bash
18+
dotnet add package EasyReasy.Database
19+
```
20+
1321
## For Service Developers (Using Repositories)
1422

1523
### Single Query (Most Common)

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# EasyReasy Database System Overview
22

3+
[![Tests](https://github.com/AdamTovatt/easy-reasy-database/actions/workflows/build.yml/badge.svg)](https://github.com/AdamTovatt/easy-reasy-database/actions/workflows/build.yml)
4+
35
The EasyReasy Database system simplifies database integration and testing. It provides a standardized way to write repositories with automatic connection and transaction management, and includes testing utilities that make integration tests performant by running them in transactions that are automatically rolled back.
46

57
## Projects
68

7-
| Project | Description |
8-
|---------|-------------|
9-
| [EasyReasy.Database](EasyReasy.Database/README.md) | Core database library providing repository base classes, session management, and database abstractions for building data access layers. |
10-
| [EasyReasy.Database.Npgsql](EasyReasy.Database.Npgsql/README.md) | PostgreSQL-specific implementation of `IDataSourceFactory` for creating Npgsql data sources with optional enum mapping support. |
11-
| [EasyReasy.Database.Sqlite](EasyReasy.Database.Sqlite/README.md) | SQLite-specific implementation of `IDataSourceFactory` for creating SQLite data sources. |
12-
| [EasyReasy.Database.Testing](EasyReasy.Database.Testing/README.md) | Testing utilities including fake database sessions for unit tests and test database management for integration tests with automatic transaction rollback. |
9+
| Project | NuGet | Description |
10+
|---------|-------|-------------|
11+
| [EasyReasy.Database](EasyReasy.Database/README.md) | [![NuGet](https://img.shields.io/nuget/v/EasyReasy.Database.svg)](https://www.nuget.org/packages/EasyReasy.Database/) | Core database library providing repository base classes, session management, and database abstractions for building data access layers. |
12+
| [EasyReasy.Database.Npgsql](EasyReasy.Database.Npgsql/README.md) | [![NuGet](https://img.shields.io/nuget/v/EasyReasy.Database.Npgsql.svg)](https://www.nuget.org/packages/EasyReasy.Database.Npgsql/) | PostgreSQL-specific implementation of `IDataSourceFactory` for creating Npgsql data sources with optional enum mapping support. |
13+
| [EasyReasy.Database.Sqlite](EasyReasy.Database.Sqlite/README.md) | [![NuGet](https://img.shields.io/nuget/v/EasyReasy.Database.Sqlite.svg)](https://www.nuget.org/packages/EasyReasy.Database.Sqlite/) | SQLite-specific implementation of `IDataSourceFactory` for creating SQLite data sources. |
14+
| [EasyReasy.Database.Testing](EasyReasy.Database.Testing/README.md) | [![NuGet](https://img.shields.io/nuget/v/EasyReasy.Database.Testing.svg)](https://www.nuget.org/packages/EasyReasy.Database.Testing/) | Testing utilities including fake database sessions for unit tests and test database management for integration tests with automatic transaction rollback. |

0 commit comments

Comments
 (0)