OfX-EFCore
3.3.0
See the version list below for details.
dotnet add package OfX-EFCore --version 3.3.0
NuGet\Install-Package OfX-EFCore -Version 3.3.0
<PackageReference Include="OfX-EFCore" Version="3.3.0" />
paket add OfX-EFCore --version 3.3.0
#r "nuget: OfX-EFCore, 3.3.0"
// Install OfX-EFCore as a Cake Addin #addin nuget:?package=OfX-EFCore&version=3.3.0 // Install OfX-EFCore as a Cake Tool #tool nuget:?package=OfX-EFCore&version=3.3.0
OfX-EFCore
OfX-EFCore is an extension package for OfX that integrates with Entity Framework Core to simplify data fetching by leveraging attribute-based data mapping. This extension streamlines data retrieval using EF Core, reducing boilerplate code and improving maintainability.
Introduction
OfX-EFCore extends the core OfX library by providing seamless integration with Entity Framework Core. This enables developers to automatically map and retrieve data directly from a database, leveraging the power of Entity Framework Core along with attribute-based data mapping.
For example, suppose you have a UserId
property in your model, and you want to fetch the corresponding Name
and Email
fields from the database. By using OfX-EFCore, you can annotate your model with attributes, and the library
will handle data fetching for you.
Installation
To install the OfX-EFCore package, use the following NuGet command:
dotnet add package OfX-EFCore
Or via the NuGet Package Manager:
Install-Package OfX-EFCore
How to Use
1. Register OfX-EfCore
Add OfX-EfCore to your service configuration during application startup:
builder.Services.AddOfXEntityFrameworkCore(cfg =>
{
cfg.AddAttributesContainNamespaces(typeof(WhereTheAttributeDefined).Assembly);
cfg.AddHandlersFromNamespaceContaining<SomeHandlerAssemblyMarker>();
})
.AddOfXEFCore(options =>
{
options.AddDbContexts(typeof(TestDbContext));
options.AddModelConfigurationsFromNamespaceContaining<SomeModelAssemblyMarker>();
});
Function Descriptions
AddDbContexts
Here, you can use the method AddDbContexts()
, which takes DbContext(s)
to executing.
AddModelConfigurationsFromNamespaceContaining
You have to tell OfX-EFCore where your models are located by assembly. OfX-EFCore will find all OfXConfigForAttribute
to create handler automatically!
That all, Enjoy your moment!
Package Name | Description | .NET Version | Document |
---|---|---|---|
Core | |||
OfX | OfX core | 8.0, 9.0 | ReadMe |
Data Querying | |||
OfX-EFCore | This is the OfX extension package using EntityFramework to fetch data | 8.0, 9.0 | This Document |
Transports | |||
OfX-gRPC | OfX.gRPC is an extension package for OfX that leverages gRPC for efficient data transportation. | 8.0, 9.0 | ReadMe |
OfX-Kafka | OfX-Kafka is an extension package for OfX that leverages Kafka for efficient data transportation. | 8.0, 9.0 | ReadMe |
OfX-Nats | OfX-Nats is an extension package for OfX that leverages Nats for efficient data transportation. | 8.0, 9.0 | ReadMe |
OfX-RabbitMq | OfX-RabbitMq is an extension package for OfX that leverages RabbitMq for efficient data transportation. | 8.0, 9.0 | ReadMe |
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. 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. |
-
net8.0
- Microsoft.EntityFrameworkCore (>= 8.0.0)
- OfX (>= 3.3.0)
-
net9.0
- Microsoft.EntityFrameworkCore (>= 8.0.0)
- OfX (>= 3.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
4.0.0 | 25 | 2/4/2025 |
3.3.3 | 64 | 2/4/2025 |
3.3.2 | 69 | 2/3/2025 |
3.3.1 | 62 | 2/1/2025 |
3.3.0 | 65 | 1/22/2025 |
3.2.1 | 67 | 1/22/2025 |
3.2.0 | 74 | 1/21/2025 |
3.1.13 | 68 | 1/18/2025 |
3.1.12 | 66 | 1/16/2025 |
3.1.11 | 70 | 1/13/2025 |
3.1.10 | 73 | 1/12/2025 |
3.1.9 | 77 | 1/10/2025 |
3.1.8 | 53 | 1/8/2025 |
3.1.7 | 73 | 1/7/2025 |
3.1.6 | 78 | 1/6/2025 |
3.1.5 | 81 | 1/5/2025 |
3.1.4 | 98 | 1/4/2025 |
3.1.3 | 101 | 1/4/2025 |
3.1.2 | 110 | 1/4/2025 |
3.1.1 | 110 | 1/3/2025 |
3.1.0 | 74 | 12/31/2024 |
3.0.5 | 79 | 12/30/2024 |
3.0.4 | 69 | 12/30/2024 |
3.0.3 | 77 | 12/30/2024 |
3.0.2 | 90 | 12/30/2024 |
3.0.1 | 81 | 12/30/2024 |
3.0.0 | 83 | 12/30/2024 |
2.0.4 | 79 | 12/30/2024 |
2.0.3 | 76 | 12/30/2024 |
2.0.2 | 80 | 12/29/2024 |
2.0.1 | 94 | 12/29/2024 |
2.0.0 | 89 | 12/28/2024 |
1.1.4 | 92 | 12/27/2024 |
1.1.3 | 78 | 12/26/2024 |
1.1.2 | 80 | 12/26/2024 |
1.1.1 | 78 | 12/26/2024 |
1.1.0 | 84 | 12/25/2024 |
1.0.8 | 88 | 12/25/2024 |
1.0.7 | 88 | 12/25/2024 |
1.0.6 | 79 | 12/25/2024 |