Skip to content

Commit 227d2ce

Browse files
committed
Added documentation for EF Core library
1 parent 4780b0f commit 227d2ce

3 files changed

Lines changed: 57 additions & 0 deletions

File tree

docs/articles/available-packages.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ title: Available packages | MADE.NET
1111
| ------ | ------ | ------ |
1212
| Collections | [![NuGet](https://img.shields.io/nuget/v/MADE.Collections)](https://www.nuget.org/packages/MADE.Collections/) | [![Nuget](https://img.shields.io/nuget/vpre/MADE.Collections.svg)](https://www.nuget.org/packages/MADE.Collections/) |
1313
| Data.Converters | [![NuGet](https://img.shields.io/nuget/v/MADE.Data.Converters)](https://www.nuget.org/packages/MADE.Data.Converters/) | [![NuGet](https://img.shields.io/nuget/vpre/MADE.Data.Converters)](https://www.nuget.org/packages/MADE.Data.Converters/) |
14+
| Data.EFCore | [![NuGet](https://img.shields.io/nuget/v/MADE.Data.EFCore)](https://www.nuget.org/packages/MADE.Data.EFCore/) | [![NuGet](https://img.shields.io/nuget/vpre/MADE.Data.EFCore)](https://www.nuget.org/packages/MADE.Data.EFCore/) |
1415
| Data.Validation | [![NuGet](https://img.shields.io/nuget/v/MADE.Data.Validation)](https://www.nuget.org/packages/MADE.Data.Validation/) | [![NuGet](https://img.shields.io/nuget/vpre/MADE.Data.Validation)](https://www.nuget.org/packages/MADE.Data.Validation/) |
1516
| Diagnostics | [![NuGet](https://img.shields.io/nuget/v/MADE.Diagnostics)](https://www.nuget.org/packages/MADE.Diagnostics/) | [![NuGet](https://img.shields.io/nuget/vpre/MADE.Diagnostics)](https://www.nuget.org/packages/MADE.Diagnostics/) |
1617
| Media.Image | [![NuGet](https://img.shields.io/nuget/v/MADE.Media.Image)](https://www.nuget.org/packages/MADE.Media.Image/) | [![NuGet](https://img.shields.io/nuget/vpre/MADE.Media.Image)](https://www.nuget.org/packages/MADE.Media.Image/) |
@@ -60,6 +61,22 @@ It includes features such as:
6061

6162
</span>
6263

64+
## Data.EFCore
65+
66+
The Data Entity Framework Core package provides a collection of helpers, extensions, and converters for applications taking advantage of the `Microsoft.EntityFrameworkCore` library.
67+
68+
It includes features such as:
69+
70+
- DbContextExtensions, for additional helpers to EF data contexts such as asynchronous update & save.
71+
- EntityBase, for providing a base definition for entities including a GUID identifier, created, and updated dates.
72+
- UtcDateTimeConverter, to help with the storing of entity model dates in a UTC format.
73+
74+
<span class="button">
75+
76+
[Discover Data.EFCore](features/data-efcore.md)
77+
78+
</span>
79+
6380
## Data.Validation
6481

6582
The Data Validation package is designed to provide out-of-the-box data validation to applications built with C#.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
uid: package-data-converters
3+
title: Using the Data Converters package | MADE.NET
4+
---
5+
6+
# Using the Data Entity Framework Core package
7+
8+
The Data Entity Framework Core package provides a collection of helpers, extensions, and converters for applications taking advantage of the `Microsoft.EntityFrameworkCore` library.
9+
10+
## Standardizing your entities with EntityBase
11+
12+
When setting up your entities, there are some common standard properties you'll usually want to include in most circumstances.
13+
14+
These are:
15+
16+
- An identifier
17+
- A date the entity was created
18+
- A date the entity was last updated
19+
20+
This is what the `MADE.Data.EFCore.EntityBase` type provides for you. It even goes as far as to initialize your created and last updated date values for you when you create your object.
21+
22+
To use it for your own entities, it's as simple as inheriting from the `EntityBase` type.
23+
24+
```csharp
25+
namespace MyApp.Data
26+
{
27+
using MADE.Data.EFCore;
28+
29+
public class User : EntityBase
30+
{
31+
public string FirstName { get; set; }
32+
33+
public string LastName { get; set; }
34+
35+
public string EmailAddress { get; set; }
36+
}
37+
}
38+
```

docs/articles/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
href: features/collections.md
1111
- name: Data Converters
1212
href: features/data-converters.md
13+
- name: Data EF Core
14+
href: features/data-efcore.md
1315
- name: Data Validation
1416
href: features/data-validation.md
1517
- name: Diagnostics

0 commit comments

Comments
 (0)