Class ServicesConfiguration
Dependency injection configuration class for DataWeb SQL Server data access services. Registers all SQL Server-backed store implementations for resources, settings, items, audit, analytics, identity, notifications, media, newsletters, permissions, and more.
Inherited Members
Namespace: DataWeb.Data.SqlServer
Assembly: DataWeb.Data.SqlServer.dll
Syntax
public static class ServicesConfiguration
Remarks
This static configuration class follows the .NET Dependency Injection pattern and provides a single entry point for registering all SQL Server-based data access implementations. All services are registered as singletons to ensure consistent instances across the application lifetime.
Usage: Call AddDataWebDataSqlServer(IServiceCollection) as an extension method on IServiceCollection during application startup to configure all data services.
Methods
AddDataWebDataSqlServer(IServiceCollection)
Registers all DataWeb SQL Server data access services to the dependency injection container.
Declaration
public static IServiceCollection AddDataWebDataSqlServer(this IServiceCollection services)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services | The IServiceCollection to add services to. |
Returns
| Type | Description |
|---|---|
| IServiceCollection | The IServiceCollection for method chaining. |
Remarks
Registers the following service implementations:
- SQL Helper and Resource Store (core data access)
- Application-level stores (Settings, Errors, Redirects, Notifications, Sequential Values)
- Content stores (Items, Relations, Areas, Elements, Sections, Views, Forms, Lists)
- Identity stores (Users, User Logins, User Settings, Roles)
- Permission stores (Permissions, Permission Sets, Rules)
- Audit and Analytics stores (Audit Events, Analytics Goals, Context Items)
- Media and File stores (Files, Images)
- Dashboard stores (Widgets, Panels)
- Newsletter stores (Mailing Lists, Models, Rows, Events, Subscribers)
- Automation stores (Tasks, Scenarios)
- Content Templating stores
- Terms and Compliance stores (Terms Approval)
All services are registered with TryAddSingleton<TService, TImplementation>(IServiceCollection) to ensure they are only added if not already present in the container.