You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>Controllers are auto-generated (using <ahref="https://docs.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/source-generators-overview">source generators</a>) when you add <code>[Resource]</code> on your model class:</p>
<p>Auto-generated controllers are convenient to get started, but may not work as expected with certain customizations.
98
+
For example, 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.
99
+
In such cases, it's perfectly fine to use <ahref="#explicit-controllers">explicit controllers</a> instead.</p>
<p>In case you don't want to use auto-generated controllers and define them yourself (see below), remove
152
159
<code>[Resource]</code> from your models or use <code>[Resource(GenerateControllerEndpoints = JsonApiEndpoints.None)]</code>.</p>
153
-
<h2id="earlier-versions">Earlier versions</h2>
154
-
<p>In earlier versions of JsonApiDotNetCore, you needed to create controllers that inherit from <code>JsonApiController<TResource, TId></code>. For example:</p>
0 commit comments