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
Remove short-hand interfaces for TId is int (#1093)
* Removed single-parameter controllers
* Removed base class: I can't think of a reason why we should have an intermediate base class for these tests
* Removed single-parameter resource services
* Removed single-parameter resource repositories
* Removed single-parameter resource definitions
* Removed non-generic Identifiable and throw for resource classes that only implement IIdentifiable (without ID) when building the resource graph
* Updated documentation
@@ -95,10 +78,10 @@ As with the ActionFilter attributes, if a service implementation is not availabl
95
78
For more information about resource service injection, see [Replacing injected services](~/usage/extensibility/layer-overview.md#replacing-injected-services) and [Resource Services](~/usage/extensibility/services.md).
@@ -34,18 +34,18 @@ A sample implementation that performs authorization might look like this.
34
34
All of the methods in EntityFrameworkCoreRepository will use the `GetAll()` method to get the `DbSet<TResource>`, so this is a good method to apply filters such as user or tenant authorization.
For various reasons (see examples below) you may need to change parts of the query, depending on resource type.
34
-
`JsonApiResourceDefinition<TResource>` (which is an empty implementation of `IResourceDefinition<TResource>`) provides overridable methods that pass you the result of query string parameter parsing.
34
+
`JsonApiResourceDefinition<TResource, TId>` (which is an empty implementation of `IResourceDefinition<TResource, TId>`) provides overridable methods that pass you the result of query string parameter parsing.
35
35
The value returned by you determines what will be used to execute the query.
36
36
37
37
An intermediate format (`QueryExpression` and derived types) is used, which enables us to separate JSON:API implementation
@@ -45,7 +45,7 @@ For example, you may accept some sensitive data that should only be exposed to a
45
45
**Note:** to exclude attributes unconditionally, use `[Attr(Capabilities = ~AttrCapabilities.AllowView)]` on a resource class property.
@@ -43,21 +43,21 @@ public class TodoItemService : JsonApiResourceService<TodoItem>
43
43
## Not Using Entity Framework Core?
44
44
45
45
As previously discussed, this library uses Entity Framework Core by default.
46
-
If you'd like to use another ORM that does not provide what JsonApiResourceService depends upon, you can use a custom `IResourceService<TResource>` implementation.
46
+
If you'd like to use another ORM that does not provide what JsonApiResourceService depends upon, you can use a custom `IResourceService<TResource, TId>` implementation.
Copy file name to clipboardExpand all lines: docs/usage/meta.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -39,10 +39,10 @@ public sealed class CopyrightResponseMeta : IResponseMeta
39
39
40
40
## Resource Meta
41
41
42
-
Resource-specific metadata can be added by implementing `IResourceDefinition<TResource, TId>.GetMeta` (or overriding it on `JsonApiResourceDefinition`):
42
+
Resource-specific metadata can be added by implementing `IResourceDefinition<TResource, TId>.GetMeta` (or overriding it on `JsonApiResourceDefinition<TResource, TId>`):
0 commit comments