Skip to content

Key Features

quyvu edited this page Oct 19, 2026 · 4 revisions

Key Features

Discover what makes FxMap the perfect choice for modern microservices architectures.

Lightning Performance

FxMap uses compiled expression trees instead of reflection, resulting in performance that's 10x faster than traditional reflection-based mapping approaches.

❌ Reflection (Slow)

// Reflection - slow at runtime
var property = type.GetProperty("Name");
var value = property.GetValue(obj);

Baseline performance

✅ FxMap (Fast)

// Compiled expressions - blazing fast
var accessor = (obj) => obj.Name;
var value = accessor(obj);

10x faster!

FluentAPI-Driven Design

Configure entity exposures and DTO mappings with clean FluentAPI — no annotations, no boilerplate. FxMap reduces your mapping code by up to 90%.

Before FxMap (100+ lines)

// Manual mapping - repetitive and error-prone
public async Task<OrderResponse> GetOrderAsync(string orderId)
{
    var order = await _orderRepository.GetByIdAsync(orderId);
    var user = await _userService.GetUserAsync(order.UserId);
    var province = await _locationService.GetProvinceAsync(user.ProvinceId);
    var country = await _locationService.GetCountryAsync(province.CountryId);
 
    return new OrderResponse
    {
        Id = order.Id,
        UserId = order.UserId,
        UserName = user.Name,
        UserEmail = user.Email,
        ProvinceName = province.Name,
        CountryName = country.Name
    };
}

With FxMap (one profile class)

// Entity config (data-provider side)
public class UserConfig : EntityConfigureOf<User>
{
    protected override void Configure()
    {
        Id(x => x.Id);
        DefaultProperty(x => x.Name);
        UseDistributedKey<UserDistributedKey>();
    }
}
 
// Profile (consumer side) - declare once, map forever
public class OrderResponseProfile : ProfileOf<OrderResponse>
{
    protected override void Configure()
    {
        UseDistributedKey<UserDistributedKey>()
            .Of(x => x.UserId)
            .For(x => x.UserName)
            .For(x => x.UserEmail, "Email")
            .For(x => x.ProvinceName, "Province.Name")
            .For(x => x.CountryName, "Province.Country.Name");
    }
}
 
// That's it!
await mapper.MapDataAsync(orderResponse);

Multi-Transport Support

FxMap works with multiple transport protocols. Write your profiles once, switch transports without any code changes.

RabbitMQ

Supported out of the box

NATS

Supported out of the box

Kafka

Supported out of the box

gRPC

Supported out of the box

Azure Service Bus

Supported out of the box

AWS SQS

Supported out of the box

Same Profile, Different Transport

// Your profiles stay the same — just change transport config
builder.Services.AddFxMap(cfg =>
{
    cfg.AddEntitiesFromAssemblyContaining<SomeEntityAssemblyMarker>();
    cfg.AddProfilesFromAssemblyContaining<SomeProfileAssemblyMarker>();
    cfg.AddRabbitMq(config => { ... });  // or .AddNats() or .AddKafka()
});
 
await mapper.MapDataAsync(order);  // Works with any transport!

Database Integration

Built-in support for Entity Framework Core and MongoDB. Query across microservices with expression-based syntax that feels native.

Entity Framework Core

builder.Services.AddFxMap(cfg => { ... })
    .AddEntityFrameworkCore(options =>
        options.AddDbContexts(typeof(AppDbContext)));

MongoDB

builder.Services.AddFxMap(cfg => { ... })
    .AddMongoDb(cfg => cfg
        .AddCollection(memberSocialCollection).AddCollection(someOtherCollection));

Production Ready

Battle-tested in production environments with comprehensive test coverage and robust error handling.

1,100+

Automated Tests

Resilient

Configurable Retry

AI-Assistant Ready

FxMap is newer than most of what an AI assistant has seen, so it tends to guess the API. Download the FxMap skills and your assistant writes profiles, entity configs and registration against the real API: the right method names, the right order of registration, and the current expression syntax.

For your coding assistant

A skill for Claude Code, and a single instructions file for Cursor, GitHub Copilot or AGENTS.md.

For assistants that browse the web

This site publishes llms.txt and llms-full.txt, the whole documentation in plain text.

Get the AI skills

Powerful Expressions

Advanced filtering, aggregation, groupBy, and projection with intuitive SQL-like DSL, used inside .For(x => x.Prop, "expression") in your profiles.

public class OrderResponseProfile : ProfileOf<OrderResponse>
{
    protected override void Configure()
    {
        UseDistributedKey<UserDistributedKey>()
            .Of(x => x.UserId)
            .For(x => x.CountryName,     "Province.Country.Name")
            .For(x => x.CompletedOrders, "Orders:where(Status = 'Done')")
            .For(x => x.TotalSpent,      "Orders:sum(Total)")
            .For(x => x.UserDetails,     "{Id, Name, Address.City as CityName}")
            .For(x => x.OrdersByStatus,  "Orders:groupBy(Status).{Status, :count as Count}");
    }
}

Source: https://fxmapper.net/docs/key-features/ — the website is always the most up to date version.

Clone this wiki locally