Skip to content

Commit 2f49978

Browse files
committed
docs: Update README to explain zero-config auto-discovery behavior
1 parent fbc9869 commit 2f49978

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ In modern applications following Clean or Onion Architecture, mapping objects be
2828

2929
* **Dependency Injection Integration**: Provides `AddGeneratedMappers()` for high-performance, reflection-free registration of mappers.
3030

31-
* **Cross-Assembly Discovery**: Easily register mappers across multiple projects using the `[assembly: DiscoverMappers]` attribute.
31+
* **Cross-Assembly Discovery**: Automatically registers mappers across multiple projects. The required `[assembly: DiscoverMappers]` attribute is injected automatically by the NuGet package.
3232

3333
* **Nested & Collection Mapping**: Automatically discovers and uses other mappers for complex, nested objects and collections.
3434

@@ -144,7 +144,8 @@ In your `Program.cs`, call `AddGeneratedMappers()` to register all mappers. To d
144144
// Program.cs
145145
using ProjectR.Generated; // The namespace where registrations are generated
146146
147-
[assembly: DiscoverMappers] // Enable discovery of mappers in referenced projects
147+
// Note: [assembly: DiscoverMappers] is automatically injected by the NuGet package.
148+
// You do not need to add it manually unless you have disabled auto-discovery.
148149
149150
var builder = WebApplication.CreateBuilder(args);
150151

0 commit comments

Comments
 (0)