FxMap 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package FxMap --version 1.0.2
                    
NuGet\Install-Package FxMap -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FxMap" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FxMap" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="FxMap" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FxMap --version 1.0.2
                    
#r "nuget: FxMap, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FxMap@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FxMap&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=FxMap&version=1.0.2
                    
Install as a Cake Tool

FxMap

Effective distributed data mapping!

public string UserId { get; set; }
public string UserName { get; set; }
public string UserEmail { get; set; }

FxMap is an open-source library focused on FluentAPI-based data mapping. It streamlines data handling across services, reduces boilerplate code, and improves maintainability.

Full Documentation | Getting Started |Expression Language

All FxMap.* packages need to have the same version.

Quick Start

dotnet add package FxMap
// 1. Configure FxMap
builder.Services.AddFxMap(cfg =>
{
    cfg.AddEntitiesFromAssemblyContaining<SomeEntityAssemblyMarker>();
    cfg.AddProfilesFromAssemblyContaining<SomeProfileAssemblyMarker>();
});

// 2. Define a distributed key
public sealed class UserDistributedKey : IDistributedKey;

// 3. Configure the entity with FluentAPI
public class UserConfig : EntityConfigureOf<User>
{
    protected override void Configure()
    {
        Id(x => x.Id);
        DefaultProperty(x => x.Name);
        UseDistributedKey<UserDistributedKey>(); // Or you want to absolute lose coupling, you can use: UseDistributedKey("UserDistributedKey")
        ExposedName(x => x.Email, "UserEmail");
    }
}

// 4. Define a profile for your DTO
public class UserResponseProfile : ProfileOf<UserResponse>
{
    protected override void Configure()
    {
        UseDistributedKey<UserDistributedKey>() // Or you want to absolute lose coupling, you can use: UseDistributedKey("UserDistributedKey")
            .Of(x => x.UserId)
            .For(x => x.UserName)
            .For(x => x.UserEmail, "Email");
    }
}

Key Features

  • FluentAPI-based Mapping: Declarative data fetching using ProfileOf<T> and EntityConfigureOf<T>
  • Powerful Expression Language: SQL-like DSL for complex queries, filtering, aggregation, and projections
  • Multiple Data Providers: Support for EF Core, MongoDB, and more
  • Multiple Transports: gRPC, NATS, RabbitMQ, Kafka, Azure Service Bus, Amazon SQS
  • GraphQL Integration: Seamless integration with HotChocolate

Expression Examples

public class UserResponseProfile : ProfileOf<UserResponse>
{
    protected override void Configure()
    {
        UseDistributedKey<UserOfAttribute>()
            .Of(x => x.UserId)
            // Simple property access
            .For(x => x.UserEmail, "Email")
            // Navigation properties
            .For(x => x.CountryName, "Country.Name")
            // Filtering
            .For(x => x.CompletedOrders, "Orders(Status = 'Done')")
            // Aggregation
            .For(x => x.TotalSpent, "Orders:sum(Total)")
            // Projection
            .For(x => x.UserDetails, "{Id, Name, Address.City as CityName}")
            // GroupBy
            .For(x => x.OrdersByStatus, "Orders:groupBy(Status).{Status, :count as Count}");
    }
}

For complete expression syntax including filters, indexers, functions, aggregations, boolean functions, coalesce, ternary operators, and more, visit Expression Documentation.

Packages

Package Description .NET
Core
FxMap Core library 8.0, 9.0, 10.0
Data Providers
FxMap.EntityFrameworkCore Entity Framework Core provider 8.0, 9.0, 10.0
FxMap.MongoDb MongoDB provider 8.0, 9.0, 10.0
Integrations
FxMap.HotChocolate HotChocolate GraphQL integration 8.0, 9.0, 10.0
Transports
FxMap.Grpc gRPC transport 8.0, 9.0, 10.0
FxMap.Nats NATS transport 8.0, 9.0, 10.0
FxMap.RabbitMq RabbitMQ transport 8.0, 9.0, 10.0
FxMap.Kafka Kafka transport 8.0, 9.0, 10.0
FxMap.Azure.ServiceBus Azure Service Bus transport 8.0, 9.0, 10.0
FxMap.Aws.Sqs Amazon SQS transport 8.0, 9.0, 10.0
Tooling
FxMap.Analyzers Roslyn analyzers 8.0, 9.0, 10.0

Documentation

Visit fxmapmapper.net for:

Contributing

Contributions are welcome! Please visit our GitHub repository to:

  • Report issues
  • Submit pull requests
  • Request features

License

This project is licensed under the Apache-2.0 license.


Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (10)

Showing the top 5 NuGet packages that depend on FxMap:

Package Downloads
FxMap.MongoDb

FxMap extension. Use MongoDb as Data Querying

FxMap.RabbitMq

FxMap.RabbitMq extension. Use RabbitMq as Data transporting

FxMap.HotChocolate

HotChocolate extension. Integrate with HotChocolate

FxMap.EntityFrameworkCore

FxMap extension. Use EntityFramework as Data Querying

FxMap.Kafka

FxMap-Kafka extension. Use Kafka as Data transporting

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.3 201 3/15/2026
1.0.2 199 3/7/2026
1.0.1 222 3/6/2026
1.0.0 219 3/6/2026