---
title: AutofacExtensions
summary: API reference for AutofacExtensions.
status: draft
owner: SAIF Documentation
last_reviewed: 2026-09-17
library: SAIF.Framework.Web.Mvc
reference_type: package
---

# AutofacExtensions

Single composition-root entry point a consuming application calls during `Application_Start` to register MVC/Web API discovery, the framework's core web services, NHibernate unit-of-work factories, the menu repository, and this library's own services into the caller's Autofac `ContainerBuilder`.

## Purpose
- Single composition-root entry point a consuming application calls during `Application_Start` to register MVC/Web API discovery, the framework's core web services, NHibernate unit-of-work factories, the menu repository, and this library's own services into the caller's Autofac `ContainerBuilder`.
- See [configuration.md](../../configuration.md) for the settings this registration requires at runtime.

## Context
- Namespace: `SAIF.Web.Mvc.Extensions`
- Assembly/package: `SAIF.Framework.Web.Mvc (source-shipping NuGet package)`
- Kind: static class

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| RegisterCommonDependencies(ContainerBuilder, Type application, IEnumerable<Assembly> dataClassMapAssemblies = null) | `public static void RegisterCommonDependencies(this ContainerBuilder builder, Type application, IEnumerable<Assembly> dataClassMapAssemblies = null)` | Registers MVC/Web API controllers and filter providers, delegates to `SAIF.Framework.Core`'s `RegisterCoreServicesForWeb`, and registers Oracle/SQL Server unit-of-work factories plus the menu repository and this library's own services; see the "Register common web dependencies" operation. |

## Behavioral notes
- The caller still owns `ContainerBuilder.Build()`; this method only adds registrations.

## Sources
- `src/Web.Mvc/Extensions/AutofacExtensions.cs`
