API

HasConversion

Configures a conversion between model and provider property types; test round trips and query translation.

Formal Syntax & Structure

csharp syntaxcsharp
model.Entity<Book>().Property(b => b.Stock).HasConversion<long>()

Working Example

Example Snippetcsharp
// Documentary fragment; see mapped lesson for context.model.Entity<Book>().Property(b => b.Stock).HasConversion<long>()
C# & .NET Reference