Skip to content

Note single project req. in common pitfalls #1676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/usage/common-pitfalls.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,7 @@ A better way is to inject your `DbContext` in a [Resource Definition](~/usage/ex
While we'd love to support such [tokens for optimistic concurrency](https://learn.microsoft.com/en-us/ef/core/saving/concurrency?tabs=data-annotations),
it turns out that the implementation is far from trivial. We've come a long way, but aren't sure how it should work when relationship endpoints and atomic operations are involved.
If you're interested, we welcome your feedback at https://github.com/json-api-dotnet/JsonApiDotNetCore/pull/1119.

#### Source generation features doesn't work on code in separated projects

See https://github.com/json-api-dotnet/JsonApiDotNetCore/issues/1511.
Comment on lines +146 to +149
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion. This is already documented at https://www.jsonapi.net/usage/extensibility/controllers.html#auto-generated-controllers, which we should link to. Please move this topic after "Do not use [ApiController] on JSON:API controllers".

Suggested header name:

Don't use auto-generated controllers with shared models

Suggested text:

When model classes are defined in a separate project, the controllers are generated in that project as well, which is probably not what you want. For details, see [here](~/usage/extensibility/controllers.html#auto-generated-controllers).

Loading