Section navigation

Public classSealed LeanNumericAttribute

Namespace
Rowles.LeanCorpus.Mapping.Attributes
Assembly
Rowles.LeanCorpus.dll

Maps a numeric, temporal, or decimal property to a NumericField (or a StoredField when Encoding is DecimalAsString).

[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
public sealed class LeanNumericAttribute : Attribute
Inheritance
LeanNumericAttribute

Public constructor LeanNumericAttribute(string)

Initialises a new LeanNumericAttribute.

Public property Encoding

The encoding used when projecting non-numeric CLR types such as DateTimeOffset, DateOnly, TimeOnly, and decimal.

Public property Name

The field name used at indexing time.

Public property Required

Whether the field is required by the generated schema.

Public property Stored

Whether the value is persisted in stored fields. Defaults to true.