From 81f9f8b7f1bee80bb3c6744f7048b251cc9bec1d Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Thu, 11 Jan 2024 13:27:37 -0800 Subject: [PATCH] docs: improve formatting of coalesce config builder methods --- docs/topics/startup.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/topics/startup.md b/docs/topics/startup.md index 312cf9326..1c88d6885 100644 --- a/docs/topics/startup.md +++ b/docs/topics/startup.md @@ -1,7 +1,7 @@ # Application Configuration -In order for Coalesce to work in your application, you must register the needed services in your ``Startup.cs`` file. Doing so is simple: +In order for Coalesce to work in your application, you must register the needed services in your `Startup.cs` or `Program.cs`. Doing so is simple: ``` c# public void ConfigureServices(IServiceCollection services) @@ -40,29 +40,29 @@ public void ConfigureServices(IServiceCollection services) } ``` -A summary is as follows: +Available builder methods include: -`.AddContext()` + Register services needed by Coalesce to use the specified context. This is done automatically when calling the `services.AddCoalesce();` overload. -`.UseDefaultDataSource(typeof(MyDataSource<,>))` + Overrides the default data source used, replacing the [Standard Data Source](/modeling/model-components/data-sources.md#standard-data-source). See [Data Sources](/modeling/model-components/data-sources.md) for more details. -`.UseDefaultBehaviors(typeof(MyBehaviors<,>))` + Overrides the default behaviors used, replacing the [Standard Behaviors](/modeling/model-components/behaviors.md#standard-behaviors). See [Behaviors](/modeling/model-components/behaviors.md) for more details. -`.UseTimeZone(TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time"))` + Specify a static time zone that should be used when Coalesce is performing operations on dates/times that lack timezone information. For example, when a user inputs a search term that contains only a date, Coalesce needs to know what timezone's midnight to use when performing the search. -`.UseTimeZone()` + Specify a service implementation to use to resolve the current timezone. This should be a scoped service, and will be automatically registered if it is not already. This allows retrieving timezone information on a per-request basis from HTTP headers, Cookies, or any other source. -`.Configure(...)` + Configure additional options for Coalesce runtime behavior. Current options include options for server-side validation, and options for exception handling. See individual members for details.