OfX-EFCore
3.2.1
See the version list below for details.
dotnet add package OfX-EFCore --version 3.2.1
NuGet\Install-Package OfX-EFCore -Version 3.2.1
<PackageReference Include="OfX-EFCore" Version="3.2.1" />
<PackageVersion Include="OfX-EFCore" Version="3.2.1" />
<PackageReference Include="OfX-EFCore" />
paket add OfX-EFCore --version 3.2.1
#r "nuget: OfX-EFCore, 3.2.1"
#:package OfX-EFCore@3.2.1
#addin nuget:?package=OfX-EFCore&version=3.2.1
#tool nuget:?package=OfX-EFCore&version=3.2.1
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. 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. |
-
net8.0
- Microsoft.EntityFrameworkCore (>= 8.0.0)
- OfX (>= 3.2.1)
-
net9.0
- Microsoft.EntityFrameworkCore (>= 8.0.0)
- OfX (>= 3.2.1)
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 |
|---|---|---|
| 9.0.0 | 143 | 2/11/2026 |
| 8.3.0 | 121 | 2/9/2026 |
| 8.2.6 | 131 | 1/28/2026 |
| 8.2.5 | 124 | 1/24/2026 |
| 8.2.4 | 3,613 | 1/19/2026 |
| 8.2.3 | 123 | 1/18/2026 |
| 8.2.2 | 231 | 1/18/2026 |
| 8.2.1 | 136 | 1/17/2026 |
| 8.2.0 | 122 | 1/17/2026 |
| 8.1.2 | 185 | 1/13/2026 |
| 8.1.1 | 127 | 1/13/2026 |
| 8.1.0 | 122 | 1/11/2026 |
| 8.0.0 | 287 | 1/3/2026 |
| 7.2.2 | 378 | 12/18/2025 |
| 7.2.1 | 657 | 12/1/2025 |
| 7.2.0 | 431 | 11/18/2025 |
| 7.2.0-preview | 430 | 11/18/2025 |
| 7.1.10 | 224 | 10/20/2025 |
| 7.1.9 | 216 | 10/17/2025 |
| 3.2.1 | 196 | 1/22/2025 |