Skip to content

Commit

Permalink
docs: fix grammer in services.md (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminMichaelis authored May 28, 2024
1 parent 9a07964 commit 14ccf46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/modeling/model-types/services.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Services

In a Coalesce application, you are likely to end up with a need for some API endpoints that aren't closely tied with your regular data model. While you could stick [Static Methods](/modeling/model-components/methods.md#static-methods) on one of your entities, do so is detrimental to the organization of your code.
In a Coalesce application, you are likely to end up with a need for some API endpoints that aren't closely tied with your regular data model. While you could stick [Static Methods](/modeling/model-components/methods.md#static-methods) on one of your entities, to do so is detrimental to the organization of your code.

Instead, Coalesce allows you to generate API Controllers and a TypeScript client from a service. A service, in this case, is nothing more than a C# class or an interface with methods on it, annotated with `[Coalesce, Service]`. An implementation of this class or interface must be injectable from your application's service container, so a registration in Startup.cs is needed.

Expand Down Expand Up @@ -61,4 +61,4 @@ public class Startup
}
```

While it isn't required that an interface for your service exist (you can generate directly from the implementation), it is highly recommended that an interface be used. Interfaces increase testability and reduce risk of accidentally changing the signature of a published API, among other benefits.
While it isn't required that an interface for your service exist (you can generate directly from the implementation), it is highly recommended that an interface be used. Interfaces increase testability and reduce risk of accidentally changing the signature of a published API, among other benefits.

0 comments on commit 14ccf46

Please sign in to comment.