FxMap.EntityFrameworkCore
1.0.3
dotnet add package FxMap.EntityFrameworkCore --version 1.0.3
NuGet\Install-Package FxMap.EntityFrameworkCore -Version 1.0.3
<PackageReference Include="FxMap.EntityFrameworkCore" Version="1.0.3" />
<PackageVersion Include="FxMap.EntityFrameworkCore" Version="1.0.3" />
<PackageReference Include="FxMap.EntityFrameworkCore" />
paket add FxMap.EntityFrameworkCore --version 1.0.3
#r "nuget: FxMap.EntityFrameworkCore, 1.0.3"
#:package FxMap.EntityFrameworkCore@1.0.3
#addin nuget:?package=FxMap.EntityFrameworkCore&version=1.0.3
#tool nuget:?package=FxMap.EntityFrameworkCore&version=1.0.3
FxMap.EntityFrameworkCore
FxMap.EntityFrameworkCore is an extension package for FxMap that integrates with Entity Framework Core to simplify data fetching by leveraging FluentAPI-based data mapping. This extension streamlines data retrieval using EF Core, reducing boilerplate code and improving maintainability.
Introduction
FxMap.EntityFrameworkCore extends the core FxMap 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 FluentAPI-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 FxMap.EntityFrameworkCore, you can configure your entity with AbstractFxMapConfig<T>
and define profiles with ProfileOf<T>, and the library will handle data fetching for you.
Installation
To install the FxMap.EntityFrameworkCore package, use the following NuGet command:
dotnet add package FxMap.EntityFrameworkCore
Or via the NuGet Package Manager:
Install-Package FxMap.EntityFrameworkCore
How to Use
1. Register FxMap.EntityFrameworkCore
Add FxMap.EntityFrameworkCore to your service configuration during application startup:
builder.Services.AddFxMap(cfg =>
{
cfg.AddEntitiesFromAssemblyContaining<SomeEntityAssemblyMarker>();
cfg.AddProfilesFromAssemblyContaining<SomeProfileAssemblyMarker>();
})
.AddEntityFrameworkCore(options =>
{
options.AddDbContexts(typeof(TestDbContext), typeof(OtherDbContext));
});
Function Descriptions
AddDbContexts
Here, you can use the method AddDbContexts(), which takes DbContext(s) to executing.
That all, Enjoy your moment!
| Package Name | Description | .NET Version | Document |
|---|---|---|---|
| Core | |||
| FxMap | FxMap core | 8.0, 9.0, 10.0 | ReadMe |
| Data Providers | |||
| FxMap.EntityFrameworkCore | FxMap extension package using EntityFramework to fetch data | 8.0, 9.0, 10.0 | This Document |
| FxMap.MongoDb | FxMap extension package using MongoDb to fetch data | 8.0, 9.0, 10.0 | ReadMe |
| Integrations | |||
| FxMap.HotChocolate | FxMap.HotChocolate is an integration package with HotChocolate for FxMap. | 8.0, 9.0, 10.0 | ReadMe |
| Transports | |||
| FxMap.Grpc | FxMap.Grpc is an extension package for FxMap that leverages gRPC for efficient data transportation. | 8.0, 9.0, 10.0 | ReadMe |
| FxMap.Kafka | FxMap.Kafka is an extension package for FxMap that leverages Kafka for efficient data transportation. | 8.0, 9.0, 10.0 | ReadMe |
| FxMap.Nats | FxMap.Nats is an extension package for FxMap that leverages Nats for efficient data transportation. | 8.0, 9.0, 10.0 | ReadMe |
| FxMap.RabbitMq | FxMap.RabbitMq is an extension package for FxMap that leverages RabbitMq for efficient data transportation. | 8.0, 9.0, 10.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 is compatible. 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. |
-
net10.0
- FxMap (>= 1.0.3)
- Microsoft.EntityFrameworkCore (>= 8.0.0)
-
net8.0
- FxMap (>= 1.0.3)
- Microsoft.EntityFrameworkCore (>= 8.0.0)
-
net9.0
- FxMap (>= 1.0.3)
- Microsoft.EntityFrameworkCore (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.