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

# WebContextViewModelBase

Base view model any action wanting automatic web-context decoration must derive from; `WebContextControllerBase.OnActionExecuted` looks for this type via a cast and silently skips decoration for models that don't derive from it (see [BR-06](../../business-rules.md#br-06-context-and-menu-decoration-require-the-matching-base-view-model)).

## Purpose
- Base view model any action wanting automatic web-context decoration must derive from; `WebContextControllerBase.OnActionExecuted` looks for this type via a cast and silently skips decoration for models that don't derive from it (see [BR-06](../../business-rules.md#br-06-context-and-menu-decoration-require-the-matching-base-view-model)).

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

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| WebContext | `public WebContextViewModel WebContext { get; set; }` | Holds the context id/value copied in from the resolved `IWebContext` after the action executes. |

## Sources
- `src/Web.Mvc/ViewModels/Bases/WebContextViewModelBase.cs`
