Skip to content

Commit fd7f903

Browse files
committed
update readme
1 parent 09879e9 commit fd7f903

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@ services.AddDbContext<ApplicationDbContext>(options =>
1414
ServiceLifetime.Transient);
1515
1616
services.AddJsonApi(config => {
17-
config.UseContext<ApplicationDbContext>();
1817
config.SetDefaultNamespace("api/v1");
18+
config.UseContext<ApplicationDbContext>();
19+
config.DefineResourceMapping(dictionary =>
20+
{
21+
dictionary.Add(typeof(TodoItem), typeof(TodoItemResource));
22+
dictionary.Add(typeof(Person), typeof(PersonResource));
23+
});
1924
});
2025
```
2126

0 commit comments

Comments
 (0)