API

ExecuteUpdate

Executes a set-based update immediately without updating tracked objects.

Formal Syntax & Structure

csharp syntaxcsharp
db.Books.Where(b => b.Id == 1).ExecuteUpdate(s => s.SetProperty(b => b.Stock, 5))

Working Example

Example Snippetcsharp
// Documentary fragment; see mapped lesson for context.db.Books.Where(b => b.Id == 1).ExecuteUpdate(s => s.SetProperty(b => b.Stock, 5))
C# & .NET Reference